From d420233ec290b50e9314d4cda644342d86311f67 Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 18 Sep 2023 15:33:26 +0200 Subject: [PATCH] Hotfix for missing application/json header in Prepr example (#55517) I added the application/json header to the API lib of the Prepr example. Because without it when statically generating an error is produced by GraphQL. Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- examples/cms-prepr/lib/api.js | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/cms-prepr/lib/api.js b/examples/cms-prepr/lib/api.js index 71543ace790ff..f0d2de551a652 100644 --- a/examples/cms-prepr/lib/api.js +++ b/examples/cms-prepr/lib/api.js @@ -2,6 +2,7 @@ async function fetchAPI(query, { variables, preview } = {}) { const response = await fetch(process.env.PREPRIO_API, { method: 'POST', headers: { + 'Content-Type': 'application/json', Authorization: 'Bearer ' + (preview