--- title: Concurrency protection features for inventory and refund mutations - Shopify developer changelog description: Shopify’s developer changelog documents all changes to Shopify’s platform. Find the latest news and learn about new platform opportunities. source_url: html: https://shopify.dev/changelog/concurrency-protection-features md: https://shopify.dev/changelog/concurrency-protection-features.md --- [Back to Developer changelog](https://shopify.dev/changelog) December 12, 2025 Tags: * Action Required * Admin GraphQL API * 2026-01 # Concurrency protection features for inventory and refund mutations This changelog consolidates all updates related to concurrency protection features for inventory and refund mutations. ## Compare and swap changes To prevent race conditions in inventory updates, we're introducing compare and swap protection through the `changeFromQuantity` field across multiple API versions: * `2026-01` : [Introducing a `changeFromQuantity` field for various inventory mutations](https://shopify.dev/changelog/compare-and-swap-for-inventory-mutations-with-change-from-quantity) * `2026-01`: [Introducing a `changeFromQuantity` field for the `inventorySetQuantities` mutation and deprecating the old compare And swap fields](https://shopify.dev/changelog/compare-and-swap-redesign-for-inventory-set-quantities) * `2026-04`: [Making the `changeFromQuantity` field required (with explict opt-out) for various inventory mutations](https://shopify.dev/changelog/making-changefromquantity-field-required) **(BREAKING)** * `2026-04`: [Making the `changeFromQuantity` field required (with explict opt-out) for the `inventorySetQuantities` mutation and removing the old compare And swap fields](https://shopify.dev/changelog/finalizing-compare-and-swap-redesign-for-inventory-set-quantities) **(BREAKING)** ## Idempotency changes To prevent duplicate operations when requests are retried, we're introducing idempotency protection through the idempotent directive: * `2026-01`: [Introducing an optional `idempotent` directive for various inventory and refund mutations](https://shopify.dev/changelog/adding-idempotency-for-inventory-adjustments-and-refund-mutations) * `2026-04` [Making the `idempotent` directive required for various inventory and refund mutations](https://shopify.dev/changelog/making-idempotency-mandatory-for-inventory-adjustments-and-refund-mutations) **(BREAKING)** ## Why we made these changes Most inventory adjustments lack concurrency and idempotency protection, leaving systems vulnerable to race conditions, duplicate updates, and integrity issues—especially when commands are retried due to network disruptions. To solve this we will standardize concurrency and idempotency checks across Inventory APIs. For more information, refer to our [idempotency](https://shopify.dev/docs/api/usage/idempotent-requests) and [compare and swap](https://shopify.dev/docs/apps/build/orders-fulfillment/inventory-management-apps/manage-quantities-states#compare-and-swap) docs.