Edit in GitHubLog an issue
Adobe Commerce only. Learn more

createWishlist mutation

The createWishlist mutation creates a wish list for the logged in customer. Adobe Commerce allows customers to have multiple wish lists.

This mutation requires a valid customer authentication token.

  • enable_multiple_wishlists
  • magento_wishlist_general_is_enabled
  • maximum_number_of_wishlists

Syntax

Copied to your clipboard
mutation {
createWishlist(input: CreateWishlistInput!) {
CreateWishlistOutput
}
}

Reference

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

Example usage

The following example creates the My favorites public wish list.

Request:

Copied to your clipboard
mutation {
createWishlist(input: {
name: "My favorites"
visibility: PUBLIC
}
) {
wishlist {
id
name
visibility
}
}
}

Response:

Copied to your clipboard
{
"data": {
"createWishlist": {
"wishlist": {
"id": "3",
"name": "My favorites",
"visibility": "PUBLIC"
}
}
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.