Adobe Commerce only.
Learn more.
updateWishlist mutation
The updateWishlist
mutation updates the properties of a wish list. Adobe Commerce allows customers to change the name and visibility of wish lists.
Use the updateProductsInWishlist mutation to modify the contents of a wish list.
This mutation requires a valid customer authentication token.
Syntax
1
2
3
4
5
6
7
8
9
mutation {
updateWishlist(
wishlistUid: ID!
name: String
visibility: WishlistVisibilityEnum
) {
UpdateWishlistOutput
}
}
Example usage
The following example changes the name of an existing wish list.
Request:
1
2
3
4
5
6
7
8
9
10
11
mutation {
updateWishlist(
wishlistUid: 4
name: "My favorite things"
visibility: PUBLIC
) {
name
uid
visibility
}
}
Response:
1
2
3
4
5
6
7
8
9
{
"data": {
"updateWishlist": {
"name": "My favorite things",
"uid": "4",
"visibility": "PUBLIC"
}
}
}
Input attributes
The updateWishlist
mutation requires the following input.
Attribute | Data Type | Description |
---|---|---|
name |
String! | The unique ID of Wishlist object |
visibility |
WishlistVisibilityEnum! | Describes the visibility of the wish list. Possible values are PRIVATE and PUBLIC |
wishlistUid |
ID! | The ID of the wish list to update |
Output attributes
The UpdateWishlistOutput
object can contain the following attributes.
Attribute | Data Type | Description |
---|---|---|
name |
String! | The wish list name |
uid |
ID! | The ID of the updated wish list |
visibility |
WishlistVisibilityEnum! | The wish list visibility. Possible values are PRIVATE and PUBLIC |