ClientConfig
Base configuration shared by the API client, covering the endpoint URI, cookie naming, external checkout and per-request state.
interface ClientConfig {
api: string;
cookies: {
cartCookieName: string;
countryCookieName: string;
currencyCookieName: string;
customerCookieName: string;
localeCookieName: string;
storeCookieName: string;
};
externalCheckout: {
cmsUrl: string;
enable: boolean;
stores: Record<string, {
cmsUrl: string;
}>;
syncUrlPath: string;
};
state: ConfigState;
}Properties
| Name | Required | Type | Description |
|---|---|---|---|
api | Required | string | URI the Apollo HTTP link connects to (the Magento GraphQL endpoint). "" |
cookies | Required | { cartCookieName: string; countryCookieName: string; currencyCookieName: string; customerCookieName: string; localeCookieName: string; storeCookieName: string; } | Names of the cookies used to persist per-request state. |
externalCheckout | Required | { cmsUrl: string; enable: boolean; stores: Record<string, { cmsUrl: string; }>; syncUrlPath: string; } | Configuration for redirecting the cart to an external checkout. |
state | Required | ConfigState | Per-request state accessors and mutators. |