Skip to content

Delete All Wishlist Items

About

The createDeleteAllWishlists mutation removes all items from the authenticated customer's wishlist at once. Use this mutation to:

  • Clear the entire wishlist
  • Implement a "Clear All" button on the wishlist page
  • Reset the customer's wishlist state

Note: This is an authenticated-only operation. The customer is auto-detected from the Bearer token.

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
clientMutationIdStringOptional client-side mutation identifier for tracking.

Note: No additional input is required. Pass an empty input {}.

Possible Returns

FieldTypeDescription
deleteAllWishlists.messageString!Success message confirming deletion.
deleteAllWishlists.deletedCountInt!Number of wishlist items that were removed.

Released under the MIT License.