Skip to content

[Graphql] Category_uid is not available as a product aggregation type #32557

Closed
@damienwebdev

Description

@damienwebdev

Preconditions (*)

v2.4.2

Steps to reproduce (*)

query GetProductsInCategory($categoryUid: String!) {
  products(filter: {category_uid: {eq: $categoryUid}}) {
    aggregations {
        __typename
        attribute_code
    }
    __typename
  }
}

Expected result (*)

I expect to get category_uid back as an aggregation.

Actual result (*)


{
    "data": {
        "products": {
            "aggregations": [
                {
                    "__typename": "Aggregation",
                    "attribute_code": "price"
                },
                {
                    "__typename": "Aggregation",
                    "attribute_code": "category_id"
                },
                {
                    "__typename": "Aggregation",
                    "attribute_code": "packaging"
                },
                {
                    "__typename": "Aggregation",
                    "attribute_code": "new_brand"
                },
                {
                    "__typename": "Aggregation",
                    "attribute_code": "new_model"
                }
            ],
            "__typename": "Products"
        }
    }
}

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”.

Other information

Note that:

query GetFilterTypesForCategory {
  __type (name: "ProductAttributeFilterInput") {
      inputFields {
        name
        type {
            name
        }   
      }
  }
}

Returns the category_uid

{
    "data": {
        "__type": {
            "inputFields": [
                {
                    "name": "accessories_size",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "bed_bath_type",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "category_id",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "category_uid",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "color",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "description",
                    "type": {
                        "name": "FilterMatchTypeInput"
                    }
                },
                {
                    "name": "format",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "gender",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "length",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "material",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "name",
                    "type": {
                        "name": "FilterMatchTypeInput"
                    }
                },
                {
                    "name": "new_brand",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "new_model",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "price",
                    "type": {
                        "name": "FilterRangeTypeInput"
                    }
                },
                {
                    "name": "short_description",
                    "type": {
                        "name": "FilterMatchTypeInput"
                    }
                },
                {
                    "name": "size",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "sku",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "style",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                },
                {
                    "name": "url_key",
                    "type": {
                        "name": "FilterEqualTypeInput"
                    }
                }
            ]
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: 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: GraphQLReproduced on 2.4.2Severity: S1Affects critical data or functionality and forces users to employ a workaround.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions