Skip to content

Commit d21433c

Browse files
committed
fix(/starters/graphql-starter): add custom headers to support 4.6.0 r… (#598)
Co-authored-by: John Albin Wilkins <virtually.johnalbin@gmail.com>
1 parent 2c6d6ce commit d21433c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/drupal.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ export async function query<DataType>(payload: QueryPayload) {
3030
method: "POST",
3131
body: JSON.stringify(payload),
3232
withAuth: true, // Make authenticated requests using OAuth.
33+
headers: {
34+
"Content-Type": "application/json",
35+
Accept: "application/json",
36+
},
3337
})
3438

3539
if (!response?.ok) {

0 commit comments

Comments
 (0)