Skip to content

Commit

Permalink
fix(ws): use wsConnectionParams from fetcher options (#1840)
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo authored Apr 21, 2021
1 parent 94f1695 commit 3f00271
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/clever-peaches-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphiql/toolkit': patch
---

Use provided `wsConnectionParams`
5 changes: 4 additions & 1 deletion packages/graphiql-toolkit/src/create-fetcher/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ export const getWsFetcher = (options: CreateFetcherOptions) => {
return createLegacyWebsocketsFetcher(options.legacyClient);
}
if (options.subscriptionUrl) {
return createWebsocketsFetcherFromUrl(options.subscriptionUrl);
return createWebsocketsFetcherFromUrl(
options.subscriptionUrl,
options.wsConnectionParams,
);
}
};

0 comments on commit 3f00271

Please sign in to comment.