Fetch products separately

This commit is contained in:
Luis Alvarez
2020-10-18 17:52:07 -05:00
parent 42cb7120e5
commit c92e765814
3 changed files with 45 additions and 112 deletions

View File

@@ -9,6 +9,9 @@ import getAllPages from '@lib/bigcommerce/api/operations/get-all-pages'
export async function getStaticProps({ preview }: GetStaticPropsContext) {
const { pages } = await getAllPages()
const { products } = await getAllProducts()
// const { products: featuredProducts } = await getAllProducts({
// variables: { field: 'featuredProducts' },
// })
const { categories, brands } = await getSiteInfo()
return {