diff --git a/packages/hoppscotch-common/src/components/graphql/Request.vue b/packages/hoppscotch-common/src/components/graphql/Request.vue index 6d674d4a..e9632b74 100644 --- a/packages/hoppscotch-common/src/components/graphql/Request.vue +++ b/packages/hoppscotch-common/src/components/graphql/Request.vue @@ -72,6 +72,7 @@ import { InterceptorService } from "~/services/interceptor.service" import { useService } from "dioc/vue" import { defineActionHandler } from "~/helpers/actions" import { GQLTabService } from "~/services/tab/graphql" +import { HoppGQLAuth, HoppGQLRequest } from "@hoppscotch/data" const t = useI18n() const tabs = useService(GQLTabService) @@ -98,7 +99,23 @@ const onConnectClick = () => { } const gqlConnect = () => { - connect(url.value, tabs.currentActiveTab.value?.document.request.headers) + const inheritedHeaders = + tabs.currentActiveTab.value.document.inheritedProperties?.headers.map( + (header) => { + if (header.inheritedHeader) { + return header.inheritedHeader + } + return [] + } + ) as HoppGQLRequest["headers"] + + connect({ + url: url.value, + request: tabs.currentActiveTab.value.document.request, + inheritedHeaders, + inheritedAuth: tabs.currentActiveTab.value.document.inheritedProperties + ?.auth.inheritedAuth as HoppGQLAuth, + }) platform.analytics?.logEvent({ type: "HOPP_REQUEST_RUN", diff --git a/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue b/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue index cf5c5190..1f0ab9c4 100644 --- a/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue +++ b/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue @@ -57,26 +57,25 @@