sanity-io / example-company-website-gatsby-sanity-combo

This is an example company website using Gatsby and Sanity in combination.
https://example-company-website-gatsby-sanity-combo.now.sh
MIT License
274 stars 141 forks source link

Cannot query field "allSanityPost" on type "Query" #58

Open bugduino opened 5 years ago

bugduino commented 5 years ago

Hi, I cloned the repo, followed the blog post here and added all the content in my local Sanity Studio as described in the article, but I keep getting Cannot query field "allSanityPost" on type "Query" when I run yarn start. Any idea why?

Thank you

ibanlopez commented 5 years ago

Hi,

Same problem for me but I've followed a different configuration following https://www.sanity.io/blog/live-coding-with-gatsby-js-and-sanity-io-how-to-make-a-portfolio-website to the letter.

It's like graphiql did not know anything about the sanity studio schema.

I followed gatsby-source-sanity plugin instructions, set up sanity studio and schemas, deployed graphql API enabling Graphql playgroung which works as expected, but for Gatsby graphiql interface is like data did not exist.

I'm wondering if there's any step missing for me.

Thanks a lot.

bugduino commented 5 years ago

I have recloned the repo today, yarn install, yarn run init (using the project and dataset that I already created) and after that yarn start shows no errors related to graphql. Did one of the last commit solved the issue? Anyway there's still a little bug, I had to yarn add gatsby-react-router-scroll in the web/ folder to make it working, but now seems fine.

zRelux commented 4 years ago

Had the same issue but redeploying the graphql and deleting the .cache folder fixes it

fullspectrumprocessing commented 4 years ago

Hey guys Im getting this error too but deleting cache and redeploying graphql is not working. Any other solutions.