wesbos / master-gatsby

slick slices eh
358 stars 388 forks source link

Need to deploy sanity graphql API to be able to use source plugin #76

Closed matt-peck-masheen closed 3 years ago

matt-peck-masheen commented 3 years ago

Module #5 / Video #17 The video adds the gatsby-source-sanity plugin to gatsby-config. I was unable to get npm start to work after updating the file and received this error message in the terminal:

Screen Shot 2021-01-03 at 12 30 36 PM

After trying a few things I visited this link: https://github.com/sanity-io/gatsby-source-sanity#basic-usage

Key sentence: "You should redeploy the GraphQL API everytime you make changes to the schema that you want to use in Gatsby by running sanity graphql deploy from within your Sanity project directory"

I had to open up the sanity folder in the project and run the command sanity graphql deploy and the I was able to run npm start again successfully.

wesbos commented 3 years ago

Thanks! This is part of the course though. Perhaps you missed it?

matt-peck commented 3 years ago

Sorry about the duplicate issues, I have too many GitHub accounts lol