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?
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.
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.