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 clipboardmutation {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 clipboardmutation{deleteWishlist(wishlistId: 3){statuswishlists {idnameitems_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}]}}}