From 5003e76222846d6ee2098be251f559c13a19db8d Mon Sep 17 00:00:00 2001 From: Chris Runo Date: Fri, 17 Nov 2023 15:49:40 +0000 Subject: [PATCH 1/3] fix(/starters/graphql-starter): add custom headers to support 4.6.0 release of the graphql moculde --- starters/graphql-starter/lib/drupal.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/starters/graphql-starter/lib/drupal.ts b/starters/graphql-starter/lib/drupal.ts index 0fe2765c..5f3baaaf 100644 --- a/starters/graphql-starter/lib/drupal.ts +++ b/starters/graphql-starter/lib/drupal.ts @@ -30,6 +30,10 @@ export async function query(payload: QueryPayload) { method: "POST", body: JSON.stringify(payload), withAuth: true, // Make authenticated requests using OAuth. + headers: { + "Content-Type": "application/json", + Accept: "application/json", + }, }) if (!response?.ok) { From 4f910310da9a44bc795976574afae6dc02897a69 Mon Sep 17 00:00:00 2001 From: Chris Runo Date: Fri, 17 Nov 2023 15:59:55 +0000 Subject: [PATCH 2/3] fix(/starters/graphql-starter): encapsulate the Accept header key in double quotes --- starters/graphql-starter/lib/drupal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starters/graphql-starter/lib/drupal.ts b/starters/graphql-starter/lib/drupal.ts index 5f3baaaf..4ef0fc06 100644 --- a/starters/graphql-starter/lib/drupal.ts +++ b/starters/graphql-starter/lib/drupal.ts @@ -32,7 +32,7 @@ export async function query(payload: QueryPayload) { withAuth: true, // Make authenticated requests using OAuth. headers: { "Content-Type": "application/json", - Accept: "application/json", + "Accept": "application/json", }, }) From 55c62b58b931962a05f2d142a29c46462398bafa Mon Sep 17 00:00:00 2001 From: Chris Runo Date: Wed, 22 Nov 2023 10:54:40 -0500 Subject: [PATCH 3/3] style(/starters/graphql-starter): fixes from yarn format --- starters/graphql-starter/lib/drupal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/starters/graphql-starter/lib/drupal.ts b/starters/graphql-starter/lib/drupal.ts index 4ef0fc06..5f3baaaf 100644 --- a/starters/graphql-starter/lib/drupal.ts +++ b/starters/graphql-starter/lib/drupal.ts @@ -32,7 +32,7 @@ export async function query(payload: QueryPayload) { withAuth: true, // Make authenticated requests using OAuth. headers: { "Content-Type": "application/json", - "Accept": "application/json", + Accept: "application/json", }, })