diff --git a/src/api/graphql.ts b/src/api/graphql.ts index 47e04eb8..b632adbb 100644 --- a/src/api/graphql.ts +++ b/src/api/graphql.ts @@ -33,6 +33,8 @@ const handler = async ( return } + console.log('calling the api') + const { operationName, variables, query } = parseRequest(req) try { @@ -50,6 +52,8 @@ const handler = async ( if (hasErrors) { const error = errors.find(isFastStoreError) + console.error(error) + res.status(error?.extensions.status ?? 500) } diff --git a/src/pages/index.tsx b/src/pages/index.tsx index dd8f6483..c82ca463 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -96,6 +96,8 @@ export async function getServerData() { const cmsHome = await getCMSPageDataByContentType('home') + console.log("Calling server data on homepage"); + return { status: 200, props: { cmsHome },