Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

[gatsby-plugin-graphql-codegen] Error when using gatsby-source-wordpress on Gatsby 4 #139

Open
docforcedev opened this issue Nov 9, 2021 · 1 comment

Comments

@docforcedev
Copy link

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.
@docforcedev
Copy link
Author

docforcedev commented Nov 22, 2021

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'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant