Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request category with products stop showing products in nested categories since v0.11.2 #781

Open
imdimasan opened this issue Aug 11, 2023 · 0 comments

Comments

@imdimasan
Copy link

Describe the bug
Request a category with products nodes returns only first-level category products. This was changed in v0.12.0. I can't find any solution to retrieve all products in nested categories since v0.12.0.

To Reproduce
Steps to reproduce the behavior:

  1. Install both versions 0.11.2 and 0.12.0
  2. Activate 0.11.2
  3. Make a request:
    query GetCategory { productCategories(where: {slug: "komfort"}) { nodes { id name uri products(first: 99) { nodes { ... on VariableProduct { id name variations { nodes { id name } } } ... on SimpleProduct { id name } } } } } }
  4. Deactivate v0.11.2
  5. Activate v0.12.0
  6. Make a request with the same query

Expected behavior
As WooCommerce supports categories hierarchy and can be changed in Appearance - > WooCommerce -> Categories / Products I'm expecting see the same result. I mean, If I have hierarchy such as:

  • Electronics (0)
    -- Smartphones (0)
    --- Apple (18)
    --- Samsung (5)

So when I request category "Electronics" with products query, I want to see all products in child categories (Apple and Samsung).

It works as expected in v.0.11.2, then 0.12.0 not.

Plugin Versions

  • WooGraphQL Version: 0.12.0+
  • WPGraphQL Version: 1.14.10
  • **WordPress Version:**6.3
  • **WooCommerce Version:**8.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant