Replies: 1 comment
-
Hi! Please see: https://www.gatsbyjs.com/plugins/gatsby-source-contentful/#restrictions-and-limitations If not at least one entry is defined it'll not infer the needed shape at the moment. This is a limitation that is being worked on: #30855 You'll want to use the createSchemaCustomization API in the meantime (e.g. #26112 (comment)) to manually create the types or you create "dummy content" by adding a page that you exclude that contains everything (or something like https://stackoverflow.com/questions/68898616/how-to-optionally-query-references-in-gatsby-contentful-rich-text) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Preliminary Checks
Description
I have a
Micro Content
content type in Contentful that allows an editor to have a piece of content with a link to an asset.when I use
useStaticQuery
I get the following errorMy query looks like this.
This is failing because
references
is an optional field. The editor can choose an asset link or not.Is there some way that I don't have to change this query based on whether or not there is an asset linked in the content?
Expected Result
Some fallback that doesn't fail whenever an editor change a content field
Actual Result
Gatsby fails to query and a deploy is required every time an editor makes a change.
Environment
Beta Was this translation helpful? Give feedback.
All reactions