[PR #3354] [MERGED] fix: authorisation headers not being sent along with subscriptions when using graphql #4353

Closed
opened 2026-03-17 01:53:50 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/3354
Author: @joeljstephen
Created: 9/14/2023
Status: Merged
Merged: 9/28/2023
Merged by: @AndrewBastin

Base: release/2023.8.2Head: fix/send-auth-headers-graphql


📝 Commits (4)

  • 9666470 fix: send auth headers to the payload
  • 273e0eb refactor: alert user that headers are sent to connection_init
  • d62b406 refactor: send headers only when headers are populated
  • 5829ac2 chore: cleanup code

📊 Changes

3 files changed (+11 additions, -3 deletions)

View changed files

📝 packages/hoppscotch-common/locales/en.json (+1 -0)
📝 packages/hoppscotch-common/src/components/graphql/RequestOptions.vue (+3 -0)
📝 packages/hoppscotch-common/src/helpers/graphql/connection.ts (+7 -3)

📄 Description

Ticket

Closes HFE-210

Description

This PR aims to fix the issue where authorisation headers are not being sent when a subscription is invoked using GraphQL.
Since WebSocket connection do not support sending headers, the headers will be sent as part of the payload in ‘connection_init’

Objectives

  • Fix the issue where auth headers are not being sent when using subscriptions in GraphQL
  • Notify the user when auth headers are sent as part of the payload in ‘connection_init'

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/3354 **Author:** [@joeljstephen](https://github.com/joeljstephen) **Created:** 9/14/2023 **Status:** ✅ Merged **Merged:** 9/28/2023 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `release/2023.8.2` ← **Head:** `fix/send-auth-headers-graphql` --- ### 📝 Commits (4) - [`9666470`](https://github.com/hoppscotch/hoppscotch/commit/96664700b7a15ea4c73b071c4a2a4cc516dcf182) fix: send auth headers to the payload - [`273e0eb`](https://github.com/hoppscotch/hoppscotch/commit/273e0eb0ab38aac9ab8f5eca9284e3d5fc2802ad) refactor: alert user that headers are sent to connection_init - [`d62b406`](https://github.com/hoppscotch/hoppscotch/commit/d62b40697db4941a0d722496127eb42cb9d457ac) refactor: send headers only when headers are populated - [`5829ac2`](https://github.com/hoppscotch/hoppscotch/commit/5829ac2f2540f7d37005bc134a7e5a45fbd0f7e2) chore: cleanup code ### 📊 Changes **3 files changed** (+11 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/locales/en.json` (+1 -0) 📝 `packages/hoppscotch-common/src/components/graphql/RequestOptions.vue` (+3 -0) 📝 `packages/hoppscotch-common/src/helpers/graphql/connection.ts` (+7 -3) </details> ### 📄 Description ### Ticket Closes HFE-210 ### Description This PR aims to fix the issue where authorisation headers are not being sent when a subscription is invoked using GraphQL. Since WebSocket connection do not support sending headers, the headers will be sent as part of the payload in ‘connection_init’ ### Objectives - [x] Fix the issue where auth headers are not being sent when using subscriptions in GraphQL - [x] Notify the user when auth headers are sent as part of the payload in ‘connection_init' ### Checks <!-- Make sure your pull request passes the CI checks and do check the following fields as needed - --> - [x] My pull request adheres to the code style of this project - [ ] My code requires changes to the documentation - [ ] I have updated the documentation as required - [x] All the tests have passed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:53:50 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4353
No description provided.