Skip to content

Graphql updateCartItems (removal) not working when stock management and max stock amount reached #30220

Closed
@paulappelbe

Description

@paulappelbe

Preconditions (*)

  1. Magento 2.3
  2. using graphql to add/remove products

Steps to reproduce (*)

Say you have 3 products in stock, you add 3 to the cart and try to remove one via the "updateCartItems" graphql, so setting the qty to 2, it refuses to remove because of insufficient stock.
using Luma it works, but not using graphql.

Expected result (*)

  1. you should be able to remove the product even if at max amount of stock

Actual result (*)

  1. exception happens
    main.ERROR: Could not update cart item: La quantité demandée n’est pas disponible {"exception":" (GraphQL\Error\Error(code: 0): Could not update cart item: La quantité demandée n’est pas disponible at /vendor/magento/module-quote-graph-ql/Model/Resolver/UpdateCartItems.php:92, Magento\Framework\GraphQl\Exception\GraphQlInputException(code: 0): Could not update cart item: La quantité demandée n’est pas disponible at /magento/vendor/magento/module-quote-graph-ql/Model/Cart/UpdateCartItem.php:95)"} []

Metadata

Metadata

Assignees

Labels

Component: GraphQLGraphQLIssue: Format is validGate 1 Passed. Automatic verification of issue format passedMageconf_Contribution_DayPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneProject: GraphQLSeverity: S1Affects critical data or functionality and forces users to employ a workaround.

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions