graphcommerce-org / graphcommerce

GraphCommerce® is a headless storefront replacement for Magento 2 (PWA), that delivers a faster, better user experience. Fully customizable (React, Next.js) and open-source.
https://www.graphcommerce.org
Other
307 stars 72 forks source link

Discount disappears from GetCartTotals query after updating quantity of items in cart using the UpdateItemQuantity button #2425

Closed UrosJeknic closed 5 days ago

UrosJeknic commented 5 days ago

Describe the Bug

After updating quantity using the UpdateItemQuantity button it mutates the discounts property from cart.prices

Expected Behavior

I'm guessing the CartItemCountChanged fragment that's being injected into is causing the bug because after removing it

To Reproduce

Be sure to have an item that has a [conditional] discount in your cart. Go to /cart. Click on the UpdateItemQuantity button to change the quantity of one of your items. After doing that the discount should disappear regardless if it's conditional or not.