productVariantSetDefault Mutation
Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook.
productVariantSetDefault(productId: ID!, variantId: ID!): ProductVariantSetDefault
Returns
Show return type
type ProductVariantSetDefault {
product: Product
productErrors: [ProductError!]! @deprecated(reason: "Use `errors` field instead.")
errors: [ProductError!]!
}Arguments
productId
productId · ID!
Id of a product that will have the default variant set.
variantId
variantId · ID!
Id of a variant that will be set as default.
Schema: Saleor 3.23.43. Download SDL.