Action RequiredStorefront GraphQL API2024-10
Cart Warnings in Storefront API Cart
As of API version 2024-10, inventory errors about stock levels will no longer be included in the of cart mutations. Inventory errors will now be available in a new return field,
warnings
and will contain explicit code
values of or
.
Warnings will be available on all cart mutations to show automatic changes that occurred during the mutation. You can use warnings to manage items in your cart or display information to a buyer. For example, out of stock lines can be easily removed from a cart by using the target
field included in the warning as the input to a call to .
Learn more about cart warnings on Shopify.dev.
Was this section helpful?