Skip to main content

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?