StoreConfigLoader
This reference explains how to use the StoreConfigLoader.
StoreConfigLoader
The StoreConfigLoader
is used to load the store configuration.
StoreConfigLoader(axios, storeCode);
Arguments:
Name | Type | Description |
---|---|---|
axios | Axios | Axios instance |
storeCode | String | Store code |
Example
import { createGraphQLRuntime } from "@front-commerce/core/graphql";
import { StoreConfigLoader } from "@front-commerce/magento1/config";
export default createGraphQLRuntime({
contextEnhancer: ({ req }) => {
const adminAxiosInstance = makeAdminClientFromRequest(req);
const storeConfig = StoreConfigLoader(adminAxiosInstance, "default");
},
});