graphql / graphql/graphiql

Sending headers for legacy ws client in graphiql subscriptions

Open
#2,377 0 comments 0 reactions 1 assignee Claimed by @thomasheyenbrock View on GitHub
bug graphiql
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

I am using legacy WS client for the Graphiql subscriptions. my code looks as below

```
return createGraphiQLFetcher({
headers,
url: URLs.https
legacyWsClient: new SubscriptionClient(URLs.wss + '?access_token=' + accessTokenProvider(),
{
reconnect: false,
lazy: false,
}),
});
```

I am adding custom headers from the GraphiQL UI and getting added to the HTTP based queries and mutation requests as expected. But custom headers not set in the HTTP upgrade request for subscriptions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.