Skip to main content
Version: next

StoreConfigLoader

This reference explains how to use the StoreConfigLoader.

StoreConfigLoader

The StoreConfigLoader is used to load the store configuration.

StoreConfigLoader(axios, storeCode);

Arguments:

NameTypeDescription
axiosAxiosAxios instance
storeCodeStringStore 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");
},
});