Skip to content

Magento2 Graphql get select attribute options label instead of option id

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
        }
      }
    }
   }
 }
}