-
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
Single mutation for Add to Cart that supports all product types #28524
Comments
Hi @nrkapoor. 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:
|
Hi @rogyar. Thank you for working on this issue.
|
Right now we have 7 mutations for adding different types of products to the cart. When we started working on wishlist functionality it turned out that we will have to create 14 more mutations (adding to wishlist and moving from wishlist to cart). It leads to overcomplicated flow and does not help to improve developers' experience.
Expected behavior
A single mutation is used to add all types of products to the cart.
Supported Product Types
Simple
Configurable
Virtual
Downloadable
Bundled
Gift Card
Grouped
Acceptance Criteria
All product types can be added to the cart with a single mutation.
User-friendly errors are returned in case the add to cart operation is unsuccessful.
All existing Add to Cart tests must pass for the new mutation.
Benefits
Less code complexity
Additional information
Approved Schema
The text was updated successfully, but these errors were encountered: