From 294e898378d9b65e98283af422b7daf10df71cc7 Mon Sep 17 00:00:00 2001 From: Shu Ding Date: Mon, 31 May 2021 19:35:23 +0200 Subject: [PATCH] parallelize requests --- framework/shopify/common/get-site-info.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/shopify/common/get-site-info.ts b/framework/shopify/common/get-site-info.ts index f9e67b5de..2d1a27c14 100644 --- a/framework/shopify/common/get-site-info.ts +++ b/framework/shopify/common/get-site-info.ts @@ -19,8 +19,10 @@ const getSiteInfo = async (options?: { config = getConfig(config) - const categories = await getCategories(config) - const brands = await getVendors(config) + const categoriesPromise = getCategories(config) + const brandsPromise = getVendors(config) + const categories = await categoriesPromise + const brands = await brandsPromise return { categories,