You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not exactly sure why it is there, but then again, the totals do need to be refetched when the coupon changes, right? but it seems that CartTotals fetches a lot which isn't necessary? Coupons can affect shipping method pricing, I think?
Describe the Bug
The
CouponAccordion
uses a query:GetCouponDocument
. This imports (node_modules/@graphcommerce/magento-cart-coupon/CouponAccordion/GetCoupon.graphql
):Which imports (
node_modules/@graphcommerce/magento-cart-coupon/Api/Coupon.graphql
):Problem
Because
Coupon
is a cart fragment, it imports more than needed. It also causes the Coupon component to update anytime the cart updates.Recommendation
Add the Coupon's fragment directly to the
GetCoupon
for a leaner request and less frequent Coupon component updates.Expected Behavior
Coupon query does not get shipping addresses and cart prices.
To Reproduce
The text was updated successfully, but these errors were encountered: