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

Cannot query subcategories of productCategories #828

Open sheinid opened 6 months ago

sheinid commented 6 months ago

productCategories query not returning subcategories

To Reproduce

  1. Go to GraphiQl IDE
  2. Write the provided query
  3. See the error
query GetProductCategories {
  productCategories(where: {parent: 0}) {
    nodes {
      slug
      name
      children {
        nodes {
          name
          slug
        }
      }
    }
  }
}

Expected behavior The api should return subcategories in children field.

Screenshots The query and the response. image

The list of categories image

Desktop:

Plugin Versions

Additional context It worked before, but one day it just stopped to retrieve the subcategories of productCategories.

kidunot89 commented 5 months ago

@sheinid Upgrade to WooGraphQL v0.19.0.