data-src=../../../../includes/commerce-only.md
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.
data-variant=info
data-slots=text
Use the updateProductsInWishlist mutation to modify the contents of a wish list.
This mutation requires a valid customer authentication token.
Syntax
mutation {
updateWishlist(
wishlistUid: ID!
name: String
visibility: WishlistVisibilityEnum
) {
UpdateWishlistOutput
}
}
Reference
The updateWishlist reference provides detailed information about the types and fields defined in this mutation.
Example usage
The following example changes the name of an existing wish list.
Request:
mutation {
updateWishlist(
wishlistUid: 4
name: "My favorite things"
visibility: PUBLIC
) {
name
uid
visibility
}
}
Response:
{
"data": {
"updateWishlist": {
"name": "My favorite things",
"uid": "4",
"visibility": "PUBLIC"
}
}
}