Using productSet mutation to create a new product - it seems like setting inventoryQuantities in any of the variants does not add inventory to the created variant.
This can be replicated using the “winter hat” example in the productSet documentation page but adding inventoryQuantities to the variants.
When I ask the AI Dev Assistant, it told me not to trust this input as it’s most likely ignored during product creation (lol). Can we get some clarification on this, please?
Edit: API version 2025-10, tested both sync and async flavour of the productSet mutation.
mutation createProductAsynchronous($productSet: ProductSetInput!, $synchronous: Boolean!) {
productSet(synchronous: $synchronous, input: $productSet) {
product {
id
}
productSetOperation {
id
status
userErrors {
code
field
message
}
}
userErrors {
code
field
message
}
}
}
{
"synchronous": false,
"productSet": {
"title": "winter hat",
"productOptions": [
{
"name": "Color",
"position": 1,
"values": [
{
"name": "Grey"
},
{
"name": "Black"
}
]
}
],
"variants": [
{
"optionValues": [
{
"optionName": "Color",
"name": "Grey"
}
],
"price": 79.99,
"inventoryQuantities": {
"locationId": "gid://shopify/Location/123456789",
"name": "available",
"quantity": 12
}
},
{
"optionValues": [
{
"optionName": "Color",
"name": "Black"
}
],
"price": 69.99,
"inventoryQuantities": {
"locationId": "gid://shopify/Location/123456789",
"name": "available",
"quantity": 10
}
}
]
}
}


