Skip to main content
Version: 3.x

productVariantSetDefault

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

Arguments

productId (ID!)

Id of a product that will have the default variant set.

variantId (ID!)

Id of a variant that will be set as default.

Type

ProductVariantSetDefault

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

Requires one of the following permissions: MANAGE_PRODUCTS.