Tags:
- Action Required
- Admin GraphQL API
- 2026-04
Making changeFromQuantity field required (with explicit opt-out)
changeFromQuantity field required (with explicit opt-out)This changelog relates to concurrency protection features.
Starting in 2026-04, the field will be required for the following mutations:
: Available on theinput type: Available on theinput type: Available on theinput type- productVariantsBulkUpdate: Available on the InventoryAdjustmentInput type, which is available on the
field of thetype
This is a breaking change. Note that even though the field doesn't show up as mandatory at the schema level, calling these mutations without passing in null or passing in the current actual quantity will result in an error at runtime.
What you need to do
Before migrating to version 2026-04, update your application logic to include the argument:
- To enable concurrency checks (Recommended): Pass the expected current quantity.
- To opt-out (skip checks): Explicitly pass
How to use the field
The field is useful to keep inventory data accurate, even if multiple updates are happening at the same time. If the actual quantity doesn't match the value you provide, the mutation will fail with a error, preventing unintended overwrites.
In the following example, the adjustment will only succeed if the current available quantity is 50. If another process has modified the quantity in the meantime, you'll receive an error and can retry with the updated value.
For more information on compare and swap, and when you should opt out of comparison checks, refer to our docs. We encourage users to avoid opting-out unless it's justified by their use-case.
mutation {
inventoryAdjustQuantities(
input: {
reason: "correction"
name: "available"
changes: [{
delta: 10
changeFromQuantity: 50
inventoryItemId: "gid://shopify/InventoryItem/123"
locationId: "gid://shopify/Location/456"
}]
}
) {
inventoryAdjustmentGroup {
id
}
userErrors {
code
message
}
}
}