scandipwa / scandipwa

Next-generation front-end for Magento 2
https://scandipwa.com/?utm_source=github&utm_medium=readme&utm_campaign=general
Open Software License 3.0
544 stars 314 forks source link

GraphQL query for "products" with filter "category_uid" always returns all products of all categories #5454

Open semijoe opened 1 year ago

semijoe commented 1 year ago

Steps to reproduce:

  1. fresh Magento install
  2. add some products with categories and subcategories
  3. GraphQL query for "products" with filter "category_uid" works as expected
  4. fresh install of ScandiPWA theme
  5. filter by subcategory in layered navigation
  6. GraphQL query for "products" with filter "category_uid"

Actual result

  1. filter by subcategory (checkbox in layered navigation) does not filter
  2. GraphQL query for "products" with filter "category_uid" always returns all products of all categories (even with random category_uid)

Expected result GraphQL query for "products" with filter "category_uid" should only return products within the given category

Sample GraphQL Query { products( filter: { category_uid: {eq: "Nw==" } } ) { items { name } } }

Note that the Query above works as expected in fresh Magento installation, but does NOT work after installing ScandiPWA.

Magento and ScandiPWA are just basic installations without any optional modules/extensions.

graemelambert commented 10 months ago

@semijoe did you get to the bottom of this issue?

Andrii-Antoniuk commented 9 months ago

Hi @semijoe!

I'll take a look into this issue today