example-company-website-gatsby-sanity-combo icon indicating copy to clipboard operation
example-company-website-gatsby-sanity-combo copied to clipboard

Cannot query field "allSanityPost" on type "Query"

Open bugduino opened this issue 6 years ago • 4 comments

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

bugduino avatar Apr 03 '19 15:04 bugduino

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.

ibanlopez avatar Apr 04 '19 08:04 ibanlopez

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.

bugduino avatar Apr 04 '19 08:04 bugduino

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

zRelux avatar Jan 02 '20 13:01 zRelux

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

fullspectrumprocessing avatar Mar 03 '20 20:03 fullspectrumprocessing