Order variant values
Use the Order variant values mutation to set the order of the variant values for an option.
This GraphQL preview API provides an option to order variant values for updated displays in the end user flow.
EXAMPLE-- Use this mutation to re-order variant values from Silver, Gold, White to Gold, Silver, White and update the default value to Silver.
Mutation
mutation orderProductVariantOptionValues($input: OrderProductVariantOptionValuesInput!) {
orderProductVariantOptionValues(input: $input) {
product {
addon
allowMultiplePurchases
defaultVariant {
configuration {
code
hexcode
name {
locale
value
}
}
edition {
code
id
inventory {
editionCode
id
sku
}
}
id
}
}
userErrors
}
}
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!