Skip to content

GraphQl products query layered navigation filters return incorrect child categories list #33387

Closed
@rohan-magento

Description

@rohan-magento

Preconditions (*)

  1. Magento 2.4.1 Adobe Commerce & Open Souce both.
  2. Use sample data to reproduce the issue

Steps to reproduce (*)

  1. Use below GraphqlQl request with sample data setup
    Use category ID - 21 with default store code in the header

query { products(filter: {category_id: {eq: "21"}}) { aggregations { attribute_code count label options { count label value } } } }

Expected result (*)

  1. Only these 4 sub-categories should appear in GraphQl response.

image

Actual result (*)

  1. More than 4 categories in aggregation result -

image

The response is more than 4 child categories which wrong here (same response below) -

{ "attribute_code": "category_id", "count": 11, "label": "Category", "options": [ { "count": 50, "label": "Tops", "value": "21" }, { "count": 14, "label": "Bras & Tanks", "value": "26" }, { "count": 13, "label": "New Luma Yoga Collection", "value": "8" }, { "count": 13, "label": "Performance Fabrics", "value": "35" }, { "count": 12, "label": "Jackets", "value": "23" }, { "count": 12, "label": "Hoodies & Sweatshirts", "value": "24" },


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CatalogGraphQlIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions