Delete Compare Item
About
The deleteCompareItem mutation removes a product from the authenticated customer's comparison list. Use this mutation to:
- Remove individual products from the compare list
- Implement "Remove from Compare" buttons
- Clean up comparison lists programmatically
Authentication
This mutation requires customer authentication:
- Authenticated customers: Provide a valid customer authentication token in the
Authorizationheader. Obtain this token via the Customer Login API.
Authorization: Bearer <accessToken>Arguments
| Argument | Type | Description |
|---|---|---|
id | ID! | The IRI of the compare item to delete (e.g. /api/shop/compare-items/606). |
clientMutationId | String | Optional client-side mutation identifier for tracking. |
Possible Returns
| Field | Type | Description |
|---|---|---|
compareItem | CompareItem! | The deleted compare item. |
compareItem.id | ID! | IRI identifier of the removed item. |
compareItem.product | Product! | Product details of the removed item. |

