gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.19k stars 10.33k forks source link

gatsby-source-wordpress - Error UNKNOWN #37211

Closed androidealp closed 1 year ago

androidealp commented 1 year ago

Preliminary Checks

Description

I have a wordpress with wp GraphQL API in version 1.13.5 and a wp gatsby in Version 2.3.3.

When I run gatsby develop on the configured wpgraphql url I get the following error:

` ERROR UNKNOWN

Missing onError handler for invocation 'extracting-queries', error was 'Error: Interface field WpEdgeType.node expected but WpEnqueuedScriptConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpEnqueuedStylesheetConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpActionMonitorActionConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpPluginConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpThemeConnectionEdgeType does not provide it.'. Stacktrace was 'Error: Interface field WpEdgeType.node expected but WpEnqueuedScriptConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpEnqueuedStylesheetConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpActionMonitorActionConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpPluginConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpThemeConnectionEdgeType does not provide it. at assertValidSchema (/var/www/html/gatsby-wordpress/node_modules/graphql/type/validate.js:59:11) at validate (/var/www/html/gatsby-wordpress/node_modules/graphql/validation/validate.js:63:35) at extractOperations (/var/www/html/gatsby-wordpress/node_modules/gatsby/src/query/query-compiler.js:213:18) at processQueries (/var/www/html/gatsby-wordpress/node_modules/gatsby/src/query/query-compiler.js:169:45) at compile (/var/www/html/gatsby-wordpress/node_modules/gatsby/src/query/query-compiler.js:80:19) at updateStateAndRunQueries (/var/www/html/gatsby-wordpress/node_modules/gatsby/src/query/query-watcher.ts:236:40) at extractQueries (/var/www/html/gatsby-wordpress/node_modules/gatsby/src/services/extract-queries.ts:18:3) ` however when testing with example url https://wpgatsbydemo.wpengine.com/graphql It works

Reproduction Link

https://simple.wp.next2dev.com.br/graphql

Steps to Reproduce

{ resolve: gatsby-source-wordpress, options: { // the only required plugin option for WordPress is the GraphQL url. url: process.env.WPGRAPHQL_URL || https://simple.wp.next2dev.com.br/graphql, }, },

Expected Result

url localhost:8000

Actual Result

ERROR UNKNOWN

Missing onError handler for invocation 'extracting-queries', error was 'Error: Interface field WpEdgeType.node expected but WpEnqueuedScriptConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpEnqueuedStylesheetConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpActionMonitorActionConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpPluginConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpThemeConnectionEdgeType does not provide it.'. Stacktrace was 'Error: Interface field WpEdgeType.node expected but WpEnqueuedScriptConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpEnqueuedStylesheetConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpActionMonitorActionConnectionEdgeType does not provide it.

Interface field WpEdgeType.node expected but WpPluginConnectionEdgeType does not provide it. Interface field WpEdgeType.node expected but WpThemeConnectionEdgeType does not provide it. at assertValidSchema (/var/www/html/gatsby-wordpress/node_modules/graphql/type/validate.js:59:11) at validate (/var/www/html/gatsby-wordpress/node_modules/graphql/validation/validate.js:63:35) at extractOperations (/var/www/html/gatsby-wordpress/node_modules/gatsby/src/query/query-compiler.js:213:18) at processQueries (/var/www/html/gatsby-wordpress/node_modules/gatsby/src/query/query-compiler.js:169:45) at compile (/var/www/html/gatsby-wordpress/node_modules/gatsby/src/query/query-compiler.js:80:19) at updateStateAndRunQueries (/var/www/html/gatsby-wordpress/node_modules/gatsby/src/query/query-watcher.ts:236:40) at extractQueries (/var/www/html/gatsby-wordpress/node_modules/gatsby/src/services/extract-queries.ts:18:3)

Environment

node: v19.0.0
npm: 8.19.2
PHP:7.4

Config Flags

No response

androidealp commented 1 year ago

problem solved! the version the graphql 1.13.5 not working with gatsby-source-wordpress 7.2.1. Graphql has "now" (1.13.6) released an update that allowed the issue