[gatsby-source-contentful] Cannot query field "references" on type
See original GitHub issueDescription
After updating to the latest gatsby-source-contentful@4.3.0 from the canary version we are getting this error.
Cannot query field "references" on type "contentfulBlogPostBodyRichTextNode".
If you don't expect "references" to exist on the type "contentfulBlogPostBodyRichTextNode" it is most likely a typo.
However, if you expect "references" to exist there are a couple of solutions to common problems:
We’ve been using the new rich text for awhile now and this was bit of a surprise.
@jordan314 Also encountered this issue from this thread
Expected result
What should happen?
Gatsby should recognize references from rich text fields
Actual result
It doesn’t understand what they are.
Environment
System: OS: macOS High Sierra 10.13.6 CPU: (8) x64 Intel® Core™ i7-6700HQ CPU @ 2.60GHz Shell: 3.2.57 - /bin/bash Binaries: Node: 14.10.1 - /usr/local/bin/node Yarn: 1.16.0 - ~/.yarn/bin/yarn npm: 6.14.8 - /usr/local/bin/npm Languages: Python: 2.7.16 - /usr/bin/python Browsers: Chrome: 87.0.4280.88 Firefox: 83.0 Safari: 13.1.2 npmPackages: gatsby: ^2.24.50 => 2.29.1 gatsby-image: ^2.4.16 => 2.8.0 gatsby-plugin-amplitude-analytics: ^3.2.0 => 3.2.0 gatsby-plugin-mailchimp: ^5.2.2 => 5.2.2 gatsby-plugin-manifest: ^2.4.28 => 2.9.0 gatsby-plugin-next-seo: ^1.6.1 => 1.6.1 gatsby-plugin-offline: ^3.2.24 => 3.7.0 gatsby-plugin-react-helmet: ^3.3.10 => 3.7.0 gatsby-plugin-react-svg: ^3.0.0 => 3.0.0 gatsby-plugin-remove-serviceworker: ^1.0.0 => 1.0.0 gatsby-plugin-sharp: ^2.6.28 => 2.11.1 gatsby-plugin-sitemap: ^2.4.12 => 2.9.0 gatsby-plugin-theme-ui: ^0.3.0 => 0.3.5 gatsby-plugin-web-font-loader: ^1.0.4 => 1.0.4 gatsby-source-contentful: ^4.3.0 gatsby-source-filesystem: ^2.3.25 => 2.8.0 gatsby-transformer-remark: ^2.12.0 => 2.13.0 gatsby-transformer-sharp: ^2.5.13 => 2.9.0 npmGlobalPackages: gatsby-cli: 2.12.91
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (2 by maintainers)
Top GitHub Comments
For folks that are running into this issue:
You need to:
Yes we’ve found this issue too. We also had to create sample content for each rich text field. Limiting the types of content you can include in the contentful validation helps how many queries you have to write. We’re also looking into seeing if we can manually add nodes with these types of links into the codebase so that we don’t have to have these sample items in the CMS.