Creates a variation of a product. For example, a physical product may have different product options such as sizes, colors, or texture. A product variant is an object that allows you to identify the type of product that's available.
Side effect: Creating a variant will automatically update the options of the associated product.
mutation CreateVariant($productId: ID!, $attributes: [AttributeInput]!) {
tenant {
createVariant(productId: $productId, attributes: $attributes) {
id
product {
id
name
caption
options
}
attributes {
name
value
}
}
}
}