-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Atwix]Make the destination_cart_id argument optional in the mergeCarts mutation #30469
Comments
The issue was exported from the internal JIRA. The link to the original JIRA issue: https://jira.corp.magento.com/browse/MC-37413 |
Hi @magento-engcom-team. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento I am working on this |
Make the
destination*cart*id
argument optional in themergeCarts
mutationWhy
PR
#30633
This came up in a discussion with [@sirugh](https://github.com/sirugh] from the [
pwa-studio
|https://github.com/magento/pwa-studio) team.When a user logs in (creates a new token), one of the first things the UI needs to do is merge the current guest cart (if items are present) into the customer account's cart.
If
destination*cart*id
is required, this requires 3 round trips:Mutation.generateCustomerToken
Query.cart
to get customer cart IDMutation.mergeCarts
to merge guest cart ID into customer cartBecause a customer can only have a single cart, and this API only works for authenticated users,
destination*cart*id
is an unnecessary requirement here. If we make it optional, the login cart upgrade for UI can happen in a single request:The text was updated successfully, but these errors were encountered: