gatsby-source-wordpress issue when migrating to gatsby v3
See original GitHub issueDescription
Describe the issue that you’re seeing.
I’ve upgraded from Gatsby v2 to v3 and get a critical error when running develop and build:
Interfaces with the `nodeInterface` extension must have a field `id` of type `ID!`. Check the type definition of `WpBlockEditorContentNode`.
I upgraded React and all gatsby plugins to the latest version, including gatsby-source-wordpress.
Steps to reproduce
Clear steps describing how to reproduce the issue. Please link to a reproduction, this makes your issue much easier to diagnose (seriously).
Update form gastby v2.* to v3.
I noticed that that’s a wordpress cache file. Deleted that, but still see the same issue.
I’ve also made sure that any Gatsby and GraphQL plugins are up-to-date in Wordpress.
How to Make a Minimal Reproduction: https://www.gatsbyjs.com/contributing/how-to-make-a-reproducible-test-case/
Expected result
What should happen? Build should complete or a more details error should be displayed.
Actual result
This error:
warn Deprecation warning: `@nodeInterface` extension is deprecated and will be removed in Gatsby v4. Use interface inheritance instead.
To upgrade replace the old format:
interface `WpBlockEditorContentNode` @nodeInterface
with the new one (in `createTypes` action of schema customization API):
interface `WpBlockEditorContentNode` implements Node
Read more about schema customization here:
https://www.gatsbyjs.com/docs/reference/graphql-data-layer/schema-customization/
ERROR
Interfaces with the `nodeInterface` extension must have a field `id` of type `ID!`. Check the type definition of `WpBlockEditorContentNode`.
not finished building schema - 0.141s
What happened.
Environment
System: OS: macOS 11.2.2 CPU: (8) x64 Apple M1 Shell: 5.8 - /bin/zsh Binaries: Node: 14.15.1 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.8 - /usr/local/bin/npm Languages: Python: 2.7.16 - /usr/bin/python Browsers: Chrome: 88.0.4324.192 Firefox: 86.0 Safari: 14.0.3 npmPackages: gatsby: ^3.0.0 => 3.0.0 gatsby-background-image: ^1.4.1 => 1.4.1 gatsby-cli: ^3.0.0 => 3.0.0 gatsby-gravityforms-component: ^3.1.0 => 3.1.0 gatsby-image: ^3.0.0 => 3.0.0 gatsby-plugin-build-date: ^1.0.0 => 1.0.0 gatsby-plugin-bundle-stats: ^2.6.0 => 2.6.0 gatsby-plugin-client-side-redirect: ^1.1.0 => 1.1.0 gatsby-plugin-facebook-pixel: ^1.0.5 => 1.0.5 gatsby-plugin-feed: ^3.0.0 => 3.0.0 gatsby-plugin-google-analytics: ^3.0.0 => 3.0.0 gatsby-plugin-google-tagmanager: ^3.0.0 => 3.0.0 gatsby-plugin-loadable-components-ssr: ^2.1.0 => 2.1.0 gatsby-plugin-manifest: ^3.0.0 => 3.0.0 gatsby-plugin-netlify: ^3.0.0 => 3.0.0 gatsby-plugin-netlify-cache: ^1.2.0 => 1.2.0 gatsby-plugin-react-helmet: ^4.0.0 => 4.0.0 gatsby-plugin-react-helmet-canonical-urls: ^1.4.0 => 1.4.0 gatsby-plugin-react-i18next: ^1.0.4 => 1.0.4 gatsby-plugin-react-svg: ^3.0.0 => 3.0.0 gatsby-plugin-resolve-src: ^2.1.0 => 2.1.0 gatsby-plugin-robots-txt: ^1.5.1 => 1.5.5 gatsby-plugin-sass: ^4.0.0 => 4.0.0 gatsby-plugin-sass-resources: ^2.0.0 => 2.0.0 gatsby-plugin-sharp: ^3.0.0 => 3.0.0 gatsby-plugin-sitemap: ^3.0.0 => 3.0.0 gatsby-plugin-split-css: ^1.0.2 => 1.0.2 gatsby-plugin-transition-link: ^1.18.0 => 1.20.5 gatsby-plugin-web-font-loader: ^1.0.4 => 1.0.4 gatsby-plugin-webpack-bundle-analyzer: ^1.0.5 => 1.0.5 gatsby-source-filesystem: ^3.0.0 => 3.0.0 gatsby-source-gravityforms: ^1.0.15 => 1.0.17 gatsby-source-wordpress: ^5.0.0 => 5.0.0 gatsby-transformer-sharp: ^3.0.0 => 3.0.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (3 by maintainers)
Top GitHub Comments
For anyone who needs a workaround, you can add this to your plugin options:
I’m afraid that this is an upstream issue tracked here: https://github.com/pristas-peter/wp-graphql-gutenberg/issues/89
One thing you could try (this is untested):
In your
gatsby-node.js
: