2

I am using v2.4 in which in the products query I am getting the Optionid of select attribute instead of attribute option label. Like if i try to get color(select type) then I get value of red instead of label Red

So anybody can help me get the label instead of id

Here is my sample code

query {
 products(search:"test", pageSize: 15, sort: {price: DESC}) {
  total_count
  items {
    name
    sku
    color
    price_range {
      minimum_price {
        regular_price {
          value
          currency
        }
      }
    }
   }
 }
}
1

1 Answer 1

1

You can also find the attribute option label by searching the attribute option ID with https://devdocs.magento.com/guides/v2.4/graphql/queries/custom-attribute-metadata.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.