cartValidateDiscountCode
Preview whether a discount code is currently applicable to a cart — read-only, no cart side effects. Use for inline feedback while the buyer types a code, before calling cartDiscountCodesUpdate. Result depends on the cart subtotal (minimum-order rules) so do not cache aggressively: prefer fetchPolicy: "network-only" or include cart.subtotal in the cache key.
cartValidateDiscountCode(
cartId: ID!
discountCode: String!
): DiscountValidationResult!
Arguments
cartValidateDiscountCode.cartId ● ID! non-null scalar
Cart UUID to validate the discount code against
cartValidateDiscountCode.discountCode ● String! non-null scalar
Discount code to preview (case-insensitive)
Type
DiscountValidationResult object
Result of validating a discount code against a cart — preview only, no cart side effects.