When upgrading a product with just one “Default title” variant to a product with (multiple) product options and variants, we are seeing failures with the mutation productVariantsBulkCreate in the Shopify GraphQL Admin API.
The mutation returns the following userErrors:
{
"field": ["variants", "0", "optionValues", "0"],
"message": "Option does not exist"
}
However, the referenced product option does exist on the product. In fact, they were created just before sending this mutation.
Context
This happens when a product was originally created in Shopify (through the GraphQL API) without product options and with only the default standalone variant. Later, our integration adds product options and immediately attempts to create variants for those options using
productVariantsBulkCreate.
This appears to have worked previously, and we believe this might have been introduced with version 2026-04.
Example mutation variables
{
"productId": "gid://shopify/Product/10234679994222",
"variants": [
{
"price": "10.00",
"compareAtPrice": null,
"taxable": true,
"optionValues": [
{
"optionName": "Maat",
"name": "20x20x10 cm"
},
{
"optionName": "Vorm",
"name": "Rond"
}
]
}
],
"strategy": "REMOVE_STANDALONE_VARIANT"
}
Response
{
"data": {
"productVariantsBulkCreate": {
"productVariants": [],
"userErrors": [
{
"field": ["variants", "0", "optionValues", "0"],
"message": "Option does not exist"
}
]
}
},
"extensions": {
"cost": {
"requestedQueryCost": 30,
"actualQueryCost": 30,
"throttleStatus": {
"maximumAvailable": 2000.0,
"currentlyAvailable": 1970,
"restoreRate": 100.0
}
}
}
}
Steps to reproduce
- Create a product in Shopify without product options or custom variants.
- The product has only the default standalone variant.
- Add product options to that product through the GraphQL Admin API.
- Immediately call
productVariantsBulkCreatewith strategy:REMOVE_STANDALONE_VARIANT. - Pass
optionValuesusingoptionNameandname, where the option names match the newly created product options.
Expected behavior
The variants should be created successfully because the product options exist and the optionValues.optionName values match those options.
Actual behavior
The mutation fails with:
Option does not exist
The error points to the first option value of the first variant.
Additional observation
During investigation, we noticed that the existing default variant does receive values for the newly added product options. The failure then occurs when creating the new variants while removing the standalone variant.
Workaround
We implemented a workaround where, when this error occurs, we link the existing Shopify default variant to the first variant in our own database. On the next synchronization, that linked variant is updated with the new product options instead of being
removed/replaced immediately.
This appears to work reliably, but it seems like the original mutation should also work.
Questions
- Is this a known issue with
productVariantsBulkCreateandREMOVE_STANDALONE_VARIANTafter adding options to a previously optionless product? - Is there a required delay, separate mutation order, or product refresh step after adding options before calling
productVariantsBulkCreate?
Any guidance would be appreciated.