Closed YangVincent closed 4 years ago
It actually happens on the sandbox as well (the GraphQL error)
There was an error in your GraphQL query:
Cannot query field "inboundReferencePreviews" on type "BrainNote".
If you don't expect "inboundReferencePreviews" to exist on the type "BrainNote" it is most likely a typo.
However, if you expect "inboundReferencePreviews" 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 "inboundReferencePreviews" 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 "BrainNote":
https://www.gatsbyjs.org/docs/schema-customization/#creating-type-definitions
File: /sandbox/node_modules/@aengusm/gatsby-theme-brain/src/templates/brain.js
Hey! Thanks for trying this out. Can I know what steps you took?
We can cannot run this directly as this is a gatsby theme and we need to include this in a gatsby project as a plugin. Also, I ran into an issue, where this project wouldn't build if the markdown file in the content doesn't have [[]]
(this is a bug).
Absolutely. Thus far (with the debugging steps removed that didn't work):
npm install -g gatsby-cli
nvm upgrade
nvm update
yarn add gatsby-theme-andy
With variants of installing npm, yarn, and removing node_modules.
Just kidding, managed to get it working. I was trying to run this current project, instead of starting my own and adding this as a module.
Hi,
It's my first time using Gatsby. I got this error, was wondering if you could help me understand why it might be happening.
I got this, but it had a GraphQL error when I used the config from the sandbox.