Decrement Item Quantity
Use the decrementItemQuantity mutation to decrement only the cart item quantity.
Mutation
decrementItemQuantity(input: UpdateItemQuantityInput!): Cart!UpdateItemQuantityInput
| Argument | Type | Description |
|---|---|---|
cartId | ID! | The id of the cart you are working with |
id | ID! | The id of the item you are decrementing |
by | Int! | The amount to decrement by |
Example
mutation {
decrementItemQuantity(
input: { cartId: "ck5r8d5b500003f5o2aif0v2b", id: "5e3293a3462051", by: 10 }
) {
id
items {
id
quantity
}
}
}