Skip to content
Saleor
Esc
↑↓navigate↵open⌘Jpreview

Schema: Saleor 3.23.43Download SDLUpgrade guides

On this page

productVariantSetDefault Mutation

Set default variant for a product. Mutation triggers PRODUCT_UPDATED webhook.

Requires one of the following permissions:MANAGE_PRODUCTS
productVariantSetDefault(productId: ID!, variantId: ID!): ProductVariantSetDefault

Returns

ProductVariantSetDefault

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.

Last updated on April 13, 2026

Was this page helpful?