Config
Full configuration accepted by the Magento API client, extending ClientConfig with Apollo client, reCAPTCHA, storage and Magento-specific settings.
interface Config<T = any> extends ClientConfig {
client?: ApolloClient<T>;
cookieOptions?: Record<string, CookieOptions>;
customApolloHttpLinkOptions?: HttpOptions;
customOptions?: Partial<ApolloClientOptions<any>>;
imageProvider: string;
magentoApiEndpoint: string;
magentoBaseUrl: string;
overrides: Endpoints;
recaptcha: RecaptchaConfig;
storage: Storage;
}Properties
| Name | Required | Type | Description |
|---|---|---|---|
client | Optional | ApolloClient<T> | Pre-configured Apollo client instance. When provided, it is used as-is instead of creating a new client. |
cookieOptions | Optional | Record<string, CookieOptions> | Express cookie options applied when setting state cookies, keyed by cookie name. |
customApolloHttpLinkOptions | Optional | HttpOptions | Options merged into the Apollo HttpLink (for example to add headers or override the request URI). |
customOptions | Optional | Partial<ApolloClientOptions<any>> | Partial Apollo client options merged when constructing the client. When a link is provided here it is used to build the client directly. |
imageProvider | Required | string | Identifier of the image provider used when building product image URLs. |
magentoApiEndpoint | Required | string | URL of the Magento GraphQL API endpoint. |
magentoBaseUrl | Required | string | Base URL of the Magento instance. |
overrides | Required | Endpoints | API method overrides replacing or extending the default endpoints. |
recaptcha | Required | RecaptchaConfig | reCAPTCHA configuration. |
storage | Required | Storage | Storage implementation used to persist data. |
Referenced Types
- ClientConfig
ApolloCliente.CookieOptionsHttpOptionsApolloClientOptions- Endpoints
- RecaptchaConfig
- Storage_2