Skip to content

Graphql products query returns only ids for dropdows or multiselect fields #28200

Closed
@maximilianmikus

Description

@maximilianmikus

Preconditions (*)

  1. 2.3.5-p1 with sample data

Steps to reproduce (*)

  1. u can use this magento instance (https://magento2.kask.at/graphql) or your own testing instance with sample data. query /graphql for a product that has the gender attribute (multiselect) e.g. "dual-handle-cardio-ball"
query productDetail($url_key: String) {
  productDetail: products(filter: {url_key: {eq: $url_key}}) {
    items {
      name
      url_key
      gender
    }
  }
}

variables:

{
  "url_key": "dual-handle-cardio-ball"
}

Expected result (*)

I would expext the result to contain the labels

{
  "data": {
    "productDetail": {
      "items": [
        {
          "name": "Dual Handle Cardio Ball",
          "url_key": "dual-handle-cardio-ball",
          "gender": ["Men","Women","Unisex"]
        }
      ]
    }
  }
}

Actual result (*)

the response only returns the value ids.

{
  "data": {
    "productDetail": {
      "items": [
        {
          "name": "Dual Handle Cardio Ball",
          "url_key": "dual-handle-cardio-ball",
          "gender": "5507,5508,5511"
        }
      ]
    }
  }
}

Metadata

Metadata

Labels

Area: APIsIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedPAPPartners acceleration programPartner: AtwixPull Request is created by partner AtwixPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneProject: GraphQLReproduced 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