cartMerge
Merge a guest cart into the signed-in customer's existing cart on login. Call right after authenticating, passing the guest cart id (its secret travels in the cart credential header). Line quantities are summed per variant and the buyer's in-session checkout fields win. The returned cart keeps the SAME id and secret as the guest cart, so the stored cart-id stays valid. Requires authentication (CART_MERGE_REQUIRES_AUTH otherwise); refuses carts in different currencies (CART_CURRENCY_MISMATCH).
cartMerge(
guestCartId: ID!
): CartMergePayload!
Arguments
cartMerge.guestCartId ● ID! non-null scalar
UUID of the guest cart to merge from and keep (the survivor).
Type
CartMergePayload object
Result of cartMerge.