Skip to content
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.

Can't use null in siteMetadata fields #103

Open
hituzi-no-sippo opened this issue Jan 7, 2020 · 1 comment
Open

Can't use null in siteMetadata fields #103

hituzi-no-sippo opened this issue Jan 7, 2020 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@hituzi-no-sippo
Copy link
Owner

hituzi-no-sippo commented Jan 7, 2020

Error Message

siteMetadata.articles.ignore is [].

ERROR #85923  GRAPHQL

There was an error in your GraphQL query:

Cannot query field "ignore" on type "SiteSiteMetadataArticles".

If you don't expect "ignore" to exist on the type "SiteSiteMetadataArticles" it is most likely a typo. 
However, if you expect "ignore" to exist there are a couple of solutions to common problems:

- If you added a new data source and/or changed something inside gatsby-node.js/gatsby-config.js, please try a restart of your development server
- The field might be accessible in another subfield, please try your query in GraphiQL and use the GraphiQL explorer to see which fields you can query and what shape they have
- You want to optionally use your field "ignore" and right now it is not used anywhere. Therefore Gatsby can't infer the type and add it to the GraphQL schema. A quick fix is to add a least one entry with that field ("dummy content")

It is recommended to explicitly type your GraphQL schema if you want to use optional fields.
This way you don't have to add the mentioned "dummy content". Visit our docs to learn how you
can define the schema for "SiteSiteMetadataArticles":
 https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions
@hituzi-no-sippo hituzi-no-sippo added the help wanted Extra attention is needed label Jan 7, 2020
@hituzi-no-sippo
Copy link
Owner Author

Relation issues #111

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant