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.
Use the storeConfig
query with the following attributes to determine whether multiple wish lists are supported:
enable_multiple_wishlists
magento_wishlist_general_is_enabled
maximum_number_of_wishlists
Syntax
Copied to your clipboardmutation {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 clipboardmutation {createWishlist(input: {name: "My favorites"visibility: PUBLIC}) {wishlist {idnamevisibility}}}
Response:
Copied to your clipboard{"data": {"createWishlist": {"wishlist": {"id": "3","name": "My favorites","visibility": "PUBLIC"}}}}