From 9d3e42b5d4f204ceb04c59225ec8e706026e87f6 Mon Sep 17 00:00:00 2001 From: devendra-bruno Date: Fri, 16 May 2025 00:43:27 +0530 Subject: [PATCH] Update prepareGqlIntrospectionRequest change assignment sequence --- .../src/ipc/network/prepare-gql-introspection-request.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/bruno-electron/src/ipc/network/prepare-gql-introspection-request.js b/packages/bruno-electron/src/ipc/network/prepare-gql-introspection-request.js index 46949bdb7..5e5e8a03b 100644 --- a/packages/bruno-electron/src/ipc/network/prepare-gql-introspection-request.js +++ b/packages/bruno-electron/src/ipc/network/prepare-gql-introspection-request.js @@ -29,14 +29,15 @@ const prepareGqlIntrospectionRequest = (endpoint, combinedVars, request, collect const mapHeaders = (requestHeaders, collectionHeaders) => { const headers = {}; - each(requestHeaders, (h) => { + // Add collection headers first + each(collectionHeaders, (h) => { if (h.enabled) { headers[h.name] = h.value; } }); - // collection headers - each(collectionHeaders, (h) => { + // Then add request headers, which will overwrite if names overlap + each(requestHeaders, (h) => { if (h.enabled) { headers[h.name] = h.value; }