cartMergeUndo
Undo the merge signing in made: the current cart becomes the guest cart as it was before signing in, and the saved cart gets its own items back. Only once per sign-in, and only while CartMerge.undoable said so.
Returns
| Field | Type | Description |
|---|---|---|
success | Boolean! | Whether the guest cart was restored. It is then the current cart, so refetch the cart query. |
cartErrors | [CartMergeUndoError!] | Error details if the merge could not be undone |
Example
mutation CartMergeUndo { cartMergeUndo { success cartErrors { __typename ... on ValidationError { message } ... on CartError { message code } } }}{ "data": { "cartMergeUndo": { "success": true, "cartErrors": [ { "__typename": "ValidationError", "message": "Example" } ] } }}The query selects the return type's fields two levels deep; pick the ones you need. The response shows its shape with placeholder values.
Served by
| @evolve-framework/commercetools | Resolved |
| @evolve-framework/medusa | Resolved |
| @evolve-framework/sfcc | Resolved |
Used by
The storefront packages that send it, in these GraphQL documents:
- @evolve-storefront/feature-cart:
CartMergeUndo

