Skip to content

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 Authorization header. Obtain this token via the Customer Login API.
Authorization: Bearer <accessToken>

Arguments

ArgumentTypeDescription
idID!The IRI of the compare item to delete (e.g. /api/shop/compare-items/606).
clientMutationIdStringOptional client-side mutation identifier for tracking.

Possible Returns

FieldTypeDescription
compareItemCompareItem!The deleted compare item.
compareItem.idID!IRI identifier of the removed item.
compareItem.productProduct!Product details of the removed item.

Released under the MIT License.