Skip to content

GraphQl getProductFiltersByCategory return wrong category_id #35220

Closed
@vmishra341

Description

@vmishra341

Preconditions (*)

  1. Magento CE and EE version 2.4.3-p1

Steps to reproduce (*)

  1. get the products details filter by category
  2. use below Graphql Queries both return wrong result.

query getProductFiltersByCategory($categoryIdFilter: FilterEqualTypeInput!) {
products(filter: { category_id: $categoryIdFilter }) {
aggregations {
attribute_code
count
amshopby_filter_data{categories_filter}
label
options {
count
label
value
}
}

}

}
and use below filter Variable
{ "categoryIdFilter": { "eq": "1680" } }
here 1680 is Parent Category

OR
{
products(filter: {category_id: {eq: "1680"}}) {
aggregations {
attribute_code
label
options {
label
}
}
}
}

Expected result (*)

  1. https://prnt.sc/9LHi6lNKba4b
  2. Query should written the Sub category of Parent category just like its showing on website frontend.

Actual result (*)

It returning all the categories instead of sub category of provided category Id just like its showing on Luma theme frontend

  1. https://prnt.sc/o8Il0-XrPsLL
    2 .https://prnt.sc/XQ_DsCReuayf

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

    Area: ProductComponent: GraphQLGraphQLIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneProject: GraphQLReported on 2.4.3-p1Indicates 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