1

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

1
  • Do you have a type called ContentfulSizes?
    – ksav
    Jul 4, 2019 at 17:37

2 Answers 2

8

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

1
  • This should only fix the problem if the thing undefined was a single field. And in that case you can easily write a resolver without cluttering your contentfulspace with unneccessary images.
    – Pudora
    Oct 24, 2019 at 14:29
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.