Get products formating

- Checking related products with param
 - Changing the normalizer
 - Separate calls for product & products in normalizer
This commit is contained in:
GunaTrika
2021-09-28 10:30:55 +05:30
parent ef2bd1fdcb
commit e5a36389f9
6 changed files with 128 additions and 86 deletions

View File

@@ -24,9 +24,10 @@ export async function getStaticProps({
})
const allProductsPromise = commerce.getAllProducts({
variables: { first: 4 },
variables: { first: 2 },
config,
preview,
related: true
})
const { pages } = await pagesPromise
const { categories } = await siteInfoPromise