Skip to content

Magento 2: How to sort the attribute based on attribute label?

I have created a custom product attribute with drop-down option and added that attribute in schema.graphqls file but when checking the sorting is happening based on attribute option value not based on attribute label.

How can I sort the product attribute based on attribute label?