Przejdź do głównej zawartości

Function: isCartScopedOperation()

isCartScopedOperation(operationName): boolean

Default classifier deciding whether an operation should carry the cart access secret. Cart operations are named with a Cart prefix (Cart, CartAddLines, CartComplete, CartAvailableShippingMethods, …). Three operations are deliberately excluded because none of them is bound to a specific cart, so the secret would be meaningless on them:

  • AvailablePaymentMethods — a shop-level read (cacheable);
  • OrderByToken — a guest order lookup authorized by an opaque order token (not cacheable — served no-store);
  • PaymentCreate — a mutation operating on an order.

Withholding the secret keeps the cacheable shop-level read in the shared cache (carrying the secret would mark it identity-bearing and push it off); for the order operations it simply avoids sending a credential they never read.

Parameters

operationName

string | undefined

Returns

boolean