AdapterCtx
●cart · /core·type
Immutable context threaded into every adapter call by the kernel. Carries shop identity, locale, logger, and optional per-request signals so adapters never reach for global state.
Properties
PROPTYPEDESCRIPTION
locale
logger
shop
TShop
cartId?
string
The cart that a mutation operates against. Required on mutations; absent
on reads (which pass ``cartId`` through their ``args`` instead). The kernel
reads this on dispatch to thread cartId into adapter calls.
idempotencyKey?
string
Example
const ctx: AdapterCtx = {
shop: shopRecord,
locale: { language: 'en', country: 'US', currency: 'USD' },
logger: consoleLogger,
idempotencyKey: crypto.randomUUID(),
};Related
RunCartAdapterContractOpts runCartAdapterContract CartCapabilityUnsupportedError CartError CartNotFoundError CartProviderError CartUserError CartAdapter
MetadataOpen in GitHub ↗