gatsby-typescript
gatsby-typescript copied to clipboard
[gatsby-plugin-graphql-codegen] Error when using gatsby-source-wordpress on Gatsby 4
Describe the bug When on gatsby 4.1 with 6.1 gatsby-source-wordpress the code generator fails the entire build in either develop or build mode.
Objects are not valid as a React child (found: AggregateError: GraphQL Document Validation failed with 6 errors; Error 0: GraphQLDocumentError: Cannot query field "wpGatsbyCompatibility" on type "Query". at /Users/jreynolds/p/ripplecom-gatsby/node_modules/gatsby-source-wordpress/dist/steps/check-plugin-requirements.js:5:3 Error 1: GraphQLDocumentError: Cannot query field "isWpGatsby" on type "Query". at /Users/jreynolds/p/ripplecom-gatsby/node_modules/gatsby-source-wordpress/dist/steps/check-plugin-requirements.js:2:3 Error 2: GraphQLDocumentError: Cannot query field "generalSettings" on type "Query". at /Users/jreynolds/p/ripplecom-gatsby/node_modules/gatsby-source-wordpress/dist/steps/check-plugin-requirements.js:2:3 Error 3: GraphQLDocumentError: Cannot query field "wpGatsby" on type "Query". at /Users/jreynolds/p/ripplecom-gatsby/node_modules/gatsby-source-wordpress/dist/steps/check-plugin-requirements.js:5:3 Error 4: GraphQLDocumentError: Cannot query field "schemaMd5" on type "Query". at /Users/jreynolds/p/ripplecom-gatsby/node_modules/gatsby-source-wordpress/dist/steps/ingest-remote-schema/diff-schemas.js:2:3 Error 5: GraphQLDocumentError: Cannot query field "generalSettings" on type "Query". at /Users/jreynolds/p/ripplecom-gatsby/node_modules/gatsby-source-wordpress/dist/steps/ingest-remote-schema/diff-schemas.js:5:3). If you meant to render a collection of children, use an array instead.
I can workaround this by remove gatsby-source-wordpress from the list of documentPaths:
'./src/**/*.{ts,tsx}',
'./.cache/fragments/*.js',
'./node_modules/gatsby-!(*source-wordpress)/**/*.js'