Skip to content

Single mutation for Add to Cart that supports all product types  #28524

Closed
@nrkapoor

Description

@nrkapoor

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions