fix: authorisation headers not being sent along with subscriptions when using graphql (#3354)

* fix: send auth headers to the payload

* refactor: alert user that headers are sent to connection_init

* refactor: send headers only when headers are populated

* chore: cleanup code
This commit is contained in:
Joel Jacob Stephen
2023-09-28 21:57:07 +05:30
committed by GitHub
parent 65884293be
commit 544b045300
3 changed files with 11 additions and 3 deletions

View File

@@ -136,6 +136,9 @@ const runQuery = async (
const duration = Date.now() - startTime
completePageProgress()
toast.success(`${t("state.finished_in", { duration })}`)
if (definition?.operation === "subscription" && request.value.auth) {
toast.success(t("authorization.graphql_headers"))
}
} catch (e: any) {
console.log(e)
// response.value = [`${e}`]