Version of Novela you are using
^0.*
Number of posts you have and which data source
2, Contentful
Describe the bug
yarn build fails
Logs
"gatsby-plugin-feed" threw an error while running the onPostBuild lifecycle:
Cannot query field "secret" on type "Article".
GraphQL request:11:23
10 | author
11 | secret
| ^
12 | }
Expected behavior
Should build successfully
Browser
Is it related to https://github.com/narative/gatsby-theme-novela/issues/122?
Nope, yarn dev works fine, but yarn build is failing
It think that it has something to do with Contentful because when using local it works. Maybe double check secret field on contentful. I don't know how it works, but I would look there.
@smakosh it could be out Contentful export is out of date. I've exported latest.
make sure on Secret field in Contentful you select yes or no.
Yup it is selected but the build still fails

Removing this https://github.com/narative/gatsby-theme-novela/blob/master/%40narative/gatsby-theme-novela/gatsby-config.js#L79 fixes my issue
somehow that schema doesn't contain secret field

You should check if the user wants to use local or contentful as source of content and then use the right query, so here you should query allContentfulPost instead, I'll open a PR to handle this
@smakosh We need that field for the RSS feed to not include secret posts. The issue seems to be with contentful and secret, not with the query for the RSS
I did.
Even if you change the query, you would still need the secret field meaning the query remains the same.
changing the query works fine 馃憣
With secret field inside ?

Hmm.. but shouldn't the original query return the same results for local and contentful? I still think that the issue lies somewhere else. Maybe @brotzky can shed some light on this, since I don't know about how contentful is implemented in this theme.
If the original query allArticle works by removing the secret field, and this one allContentfulPost works with the secret field, that means that the issue is somewhere else.
After doing some research I conclude that I was wrong :) We should find a way to use allContentfulPost if the source is contentful otherwise local, as you said.
I'm trying to access themeOptions from gatsby-config.js but fail miserably, can you advice if I can actually access it as you did on gatsby-node.js?
Nvm, I managed to achieve that
https://github.com/narative/gatsby-theme-novela/pull/126 馃憖 cc @brotzky @mabasic
Great PR
we do have different queries for Contentful and Local data. Contentful is annoying in that it wont create the node field unless there is a value set in Contentful.
Yup that's where I come up with the idea of the solution 馃憤
Most helpful comment
It think that it has something to do with Contentful because when using local it works. Maybe double check
secretfield on contentful. I don't know how it works, but I would look there.