简体   繁体   中英

Error in GraphQL query it says Unknown type "ContentfulSizes"

when I try to link my gatsby project with my self -created Contentful space, it shows this issue all the time

But when I try to link my gatsby to a contentful spaces with I created with their templates or examples, it runs fine

But for self created spaces, it shows this error....

Any solutions?


ERROR #85901 GRAPHQL

There was an error in your GraphQL query:

Unknown type "ContentfulSizes". Did you mean "ContentfulSecondTry", "ContentfulContentType", or "ContentfulSecondTryEdge"?

File: node_modules\\gatsby-source-contentful\\src\\fragments.js:4:46

Go into your Contentful space, click on Media, and add a dummy image just as a placeholder.

For more details read this: https://github.com/gatsbyjs/gatsby/issues/15344#issuecomment-508242874

I addition to the answer by Will Sherman , make sure that you publish the image.

On the top right side of the page, you'll see a DRAFT dropdown button. Click on it and select PUBLISH.

Then run gatsby develop again on your local machine

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM