Updated config in operations

This commit is contained in:
Luis Alvarez
2020-10-03 16:56:20 -05:00
parent 385fd10fce
commit b1e6aa25b5
4 changed files with 7 additions and 4 deletions

View File

@@ -33,11 +33,12 @@ async function getAllProductPaths<T, V = any>(opts: {
async function getAllProductPaths({
query = getAllProductPathsQuery,
config = getConfig(),
config,
}: {
query?: string
config?: BigcommerceConfig
} = {}): Promise<GetAllProductPathsResult<GetAllProductPathsQuery>> {
config = getConfig(config)
// RecursivePartial forces the method to check for every prop in the data, which is
// required in case there's a custom `query`
const data = await config.fetch<RecursivePartial<GetAllProductPathsQuery>>(