31 July 2025
CartsProduct catalogGraphQL
You can now set the minimum and maximum quantities allowed for a Line Item in a Cart. This is useful in cases where a customer can only order a minimum amount of an item, or when you want to ensure the availability of an item that has limited stock. In addition, this feature can help prevent denial of inventory scenarios by limiting the maximum quantity that can be added to a Cart.
Limits are defined on InventoryEntryDraft, or for existing inventory entries, using the Set Inventory Limits update action. For more information, see Quantity limits on the Carts and Orders overview page.
Changes:
- [GraphQL API] Changed the
InventoryEntry
type:- Added the
minCartQuantity
field to theInventoryEntry
type. - Added the
maxCartQuantity
field to theInventoryEntry
type.
- Added the
- [GraphQL API] Changed the
InventoryEntryDraft
type:- Added the
minCartQuantity
field to theInventoryEntryDraft
type. - Added the
maxCartQuantity
field to theInventoryEntryDraft
type.
- Added the
- [GraphQL API] Changed the
InventoryEntryUpdateAction
type:- Input field
setInventoryLimits
was added to theInventoryEntryUpdateAction
type.
- Input field
- [GraphQL API] Added the following type to the GraphQL schema:
SetInventoryLimits
.
The following changes were introduced in terms of GraphQL SDL:
extend type InventoryEntry {
maxCartQuantity: Long
minCartQuantity: Long
}
extend input InventoryEntryDraft {
maxCartQuantity: Long
minCartQuantity: Long
}
extend input InventoryEntryUpdateAction {
setInventoryLimits: SetInventoryLimits
}
input SetInventoryLimits {
minCartQuantity: Int
maxCartQuantity: Int
}