From a4463d3607f33b176828bc48b6895adf3120aeec Mon Sep 17 00:00:00 2001 From: Arda TANRIKULU Date: Thu, 7 Dec 2023 18:21:27 +0300 Subject: [PATCH] Add missing changeset --- .changeset/hip-mayflies-hug.md | 6 ++++++ packages/executors/http/src/index.ts | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changeset/hip-mayflies-hug.md diff --git a/.changeset/hip-mayflies-hug.md b/.changeset/hip-mayflies-hug.md new file mode 100644 index 00000000000..224493f2e38 --- /dev/null +++ b/.changeset/hip-mayflies-hug.md @@ -0,0 +1,6 @@ +--- +'@graphql-tools/executor-http': patch +'@graphql-tools/url-loader': patch +--- + +Remove headers from extensions in the GraphQL request diff --git a/packages/executors/http/src/index.ts b/packages/executors/http/src/index.ts index 67c41a84947..17e97e8757d 100644 --- a/packages/executors/http/src/index.ts +++ b/packages/executors/http/src/index.ts @@ -136,8 +136,9 @@ export function buildHTTPExecutor( } if (request.extensions?.headers) { - Object.assign(headers, request.extensions.headers); - delete request.extensions.headers; + const { headers: headersFromExtensions, ...restExtensions } = request.extensions; + Object.assign(headers, headersFromExtensions); + request.extensions = restExtensions; } const query = print(request.document);