From 6783bc5a084d1ecc3fc2f0c8c457f56376902bd6 Mon Sep 17 00:00:00 2001 From: Conrawl Rogers Date: Wed, 13 Nov 2024 12:06:47 -0400 Subject: [PATCH] fix: ensure request headers are properly passed Closes #550 --- src/runtime/plugin.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/runtime/plugin.ts b/src/runtime/plugin.ts index 9994ae7..d18b814 100644 --- a/src/runtime/plugin.ts +++ b/src/runtime/plugin.ts @@ -102,7 +102,12 @@ export default defineNuxtPlugin(() => { } if (reqOpts?.token) { delete reqOpts.token } - return defu(reqOpts, req) + return defu(reqOpts, req, { + headers: { + 'Content-Type': 'application/json', + Accept: 'application/graphql-response+json, application/json' + } + }) }, ...v?.fetchOptions })