Edit in GitHubLog an issue
Adobe Commerce only. Learn more

deleteWishlist mutation

The deleteWishlist mutation deletes the specified wish list. In Adobe Commerce, you cannot delete the customer's default (first) wish list. This mutation is not available in Magento Open Source.

This mutation requires a valid customer authentication token.

Syntax

Copied to your clipboard
mutation {
deleteWishlist(wishlistId: ID!): DeleteWishlistOutput
}

Reference

The deleteWishlist reference provides detailed information about the types and fields defined in this mutation.

Example usage

The following example deletes a wish list.

Request:

Copied to your clipboard
mutation{
deleteWishlist(wishlistId: 3){
status
wishlists {
id
name
items_count
}
}
}

Response:

Copied to your clipboard
{
"data": {
"deleteWishlist": {
"status": true,
"wishlists": [
{
"id": "1",
"name": "Vacation Wants",
"items_count": 7
},
{
"id": "2",
"name": "Lose the Muffintop",
"items_count": 6
}
]
}
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.