On this page
Why this happens
A batch can contain valid and invalid changes. With partial updates disabled, a validation failure prevents the variant changes from being persisted; enabling partial updates permits valid changes to survive.
Implementation
Group updates by product ID and submit only intended fields. Request variant IDs and userErrors in the response. Inspect top-level GraphQL errors as well as mutation errors. With partial updates enabled, reread affected variants and retry only unresolved changes. Record the intended values and confirmed outcomes in the integration log.
Example
mutation Update($product: ID!, $variants: [ProductVariantsBulkInput!]!) {
productVariantsBulkUpdate(productId: $product, variants: $variants, allowPartialUpdates: true) {
productVariants { id price }
userErrors { field message }
}
}
For example, submit two price corrections for variants belonging to the same product. If one contains an invalid value, do not mark the whole batch successful or assume both were rejected. Reconcile each ID against the current Admin API state.
- Use a development product with two variants
- record original prices
- submit a valid and invalid correction with partial updates disabled
- reread both
- repeat with partial updates enabled
- reconcile and restore original prices.

