Wp-graphql-woocommerce: Query "products" is not found

Created on 1 May 2021  路  5Comments  路  Source: wp-graphql/wp-graphql-woocommerce

Suddenly I am getting graphql error in my application which is developed in NextJS and wp-graphql-woocommerce for API. In the last week everything was working fine, but today I am getting this error:

GraphQL error: Cannot query field "products" on type "RootQuery". Did you mean "product", "productTag", "productTags", "posts", or "productType"?

My Qeury was like:

query MyQuery { products( first: $first after: $after ) { __typename nodes { id averageRating databaseId name slug reviewCount attributes { nodes { id name visible attributeId options } } ... on SimpleProduct { salePrice regularPrice stockQuantity stockStatus } attributes { nodes { id name visible attributeId options } } reviews { nodes { author { node { databaseId } } } } description galleryImages { nodes { sourceUrl } } image { sourceUrl slug } productCategories { nodes { id name slug } } } pageInfo { hasNextPage hasPreviousPage endCursor startCursor } } }

The "products" query is currently unavailable. What to do now? Why this is unavailable without any notice?

Most helpful comment

Same here. I noticed that wp-graphql auto updated even though I don't have auto updates turned on (could have been due to me updating wordpress maybe?). The latest release (1.3.6) (updated yesterday) seems to be causing the issue.

Until resolved, downgrade to wp-graphql 1.3.5 to fix the issue.

All 5 comments

Same issue for me. "products" is not availiable in Graphql IDE neither.

Same here. I noticed that wp-graphql auto updated even though I don't have auto updates turned on (could have been due to me updating wordpress maybe?). The latest release (1.3.6) (updated yesterday) seems to be causing the issue.

Until resolved, downgrade to wp-graphql 1.3.5 to fix the issue.

Same here.

Works for me in WP GraphQL 1.3.7.

Same here. I noticed that wp-graphql auto updated even though I don't have auto updates turned on (could have been due to me updating wordpress maybe?). The latest release (1.3.6) (updated yesterday) seems to be causing the issue.

Until resolved, downgrade to wp-graphql 1.3.5 to fix the issue.

It's already fixed in WP GraphQL 1.3.7.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kenchoong picture kenchoong  路  5Comments

craigwilcox picture craigwilcox  路  4Comments

dpacmittal picture dpacmittal  路  5Comments

pmventura picture pmventura  路  3Comments

zamson picture zamson  路  4Comments