Move Wishlist Item to Cart
About
The moveWishlistToCart mutation moves a product from the customer's wishlist directly into their shopping cart. Use this mutation to:
- Implement "Move to Cart" buttons on the wishlist page
- Convert saved-for-later items into active cart items
- Streamline the purchase flow from wishlist to checkout
The item is removed from the wishlist after it is successfully added to the cart.
The mutation returns the updated cart, not the wishlist — so a client can re-render the cart from the response without a follow-up read.
Authentication
This mutation requires customer authentication:
- Authenticated customers: Provide a valid customer authentication token in the
Authorizationheader. Obtain this token via the Customer Login API.
Authorization: Bearer <accessToken>Arguments
| Argument | Type | Description |
|---|---|---|
wishlistItemId | Int! | The numeric _id of the wishlist item to move (not the IRI). |
quantity | Int | Number of units to add to cart. Defaults to 1 if omitted. |
clientMutationId | String | Optional client-side mutation identifier for tracking. |
Possible Returns
The payload is the cart the item landed in. These are the fields worth selecting; the full cart shape is documented on Get Cart.
| Field | Type | Description |
|---|---|---|
wishlistToCart.id | ID! | IRI-style cart identifier. |
wishlistToCart._id | Int | Numeric cart id. |
wishlistToCart.message | String | Result message confirming the move. |
wishlistToCart.success | Boolean | Whether the move succeeded. |
wishlistToCart.itemsCount | Int | Line items in the cart after the move. |
wishlistToCart.items | CartItemCursorConnection | The cart's items, including the one just moved. |
wishlistToCart.grandTotal | Float | Recalculated grand total. |
wishlistToCart.formattedGrandTotal | String | The same total, currency-formatted. |
wishlistToCart.cartToken | String | Token identifying the cart. |

