wp-graphql / wp-graphql-woocommerce

Add WooCommerce support and functionality to your WPGraphQL server
https://woographql.com
GNU General Public License v3.0
633 stars 123 forks source link

WooGraphQL is not working on Gatsby #842

Open raugustinas opened 3 months ago

raugustinas commented 3 months ago

Describe the bug I have created a WordPress website with WooCommerce installed and activated. Then I installed WPGraphQL and WooGraphQL plugins. Then I created a new Gatsby project, installed gatsby-source-wordpress and tried to run the project. Everything runs fine when the WooGraphQL is deactivated and throws an error when activated: Missing onError handler for invocation 'extracting-queries', error was 'Error: Interface field WpConnectionType.pageInfo expected but WpProductToProductAttributeConnectionType does not provide it. at assertValidSchema (/Users/ro/Documents/project/node_modules/graphql/type/validate.js:59:11) at validate (/Users/ro/Documents/project/node_modules/graphql/validation/validate.js:63:35) at extractOperations (/Users/ro/Documents/project/node_modules/gatsby/src/query/query-compiler.js:214:18) at processQueries (/Users/ro/Documents/project/node_modules/gatsby/src/query/query-compiler.js:170:45) at compile (/Users/ro/Documents/project/node_modules/gatsby/src/query/query-compiler.js:80:19) at updateStateAndRunQueries (/Users/ro/Documents/project/node_modules/gatsby/src/query/query-watcher.ts:236:40) at extractQueries (/Users/ro/Documents/project/node_modules/gatsby/src/services/extract-queries.ts:18:3)'

To Reproduce Steps to reproduce the behaviour:

  1. Create a WordPress website.
  2. Install and activate WooCommerce.
  3. Install and activate WPGraphQL.
  4. Install and activate WooGraphQL.
  5. Create and run the Gatsby project.

Expected behaviour Gatsby should build and run the project.

Plugin Versions

Ys-sudo commented 2 months ago

Hey there ! I managed to get this working by downgrading the woographql plugin to version 0.15.0 Hope it helps :) Cheers!