Hello guys,
When ever I am requesting this graphql storefront call
It’s yielding in non-deterministic behaviour, sometimes the discount is applied to the cart and sometimes not.
Not sure what’s the catch here
There is nothing written in the documentation as well about this behaviour,
If it’s indeed non-deterministic how do we even attempt to solve this
Thanks in advance.
https://shopify.dev/docs/api/storefront/2025-01/mutations/cartDiscountCodesUpdate
mutation cartDiscountCodesUpdate($cartId: ID!, $discountCodes: [String!]) {
cartDiscountCodesUpdate(cartId: $cartId, discountCodes: $discountCodes) {
cart {
id
}
}
}