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
 }
 }
 }
 }
 }
}
asked Mar 20, 2021 at 13:55
1
  • Try this Commented Mar 28, 2021 at 10:35

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

answered Jul 27, 2021 at 9:33

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.