Skip to content

Commit

Permalink
fix(graphql-ws-executor): changed initialization of graphql-ws client (
Browse files Browse the repository at this point in the history
…#5666)

* fix(graphql-ws-executor): changed initialization of graphql-ws client

* fix(graphql-ws-executor): add changeset
  • Loading branch information
ThomasMoritz committed Oct 27, 2023
1 parent 568d22b commit 6269314
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/tender-lions-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphql-tools/executor-graphql-ws': patch
---

changed the order how the configuration is given into the graphql-wsclient and prevent the
overwriting of the parameters
2 changes: 1 addition & 1 deletion packages/executors/graphql-ws/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function buildGraphQLWSExecutor(
graphqlWSClient = clientOptionsOrClient;
} else {
graphqlWSClient = createClient({
...clientOptionsOrClient,
webSocketImpl: WebSocket,
lazy: true,
connectionParams: () => {
Expand All @@ -34,7 +35,6 @@ export function buildGraphQLWSExecutor(
: clientOptionsOrClient.connectionParams) || {};
return Object.assign(optionsConnectionParams, executorConnectionParams);
},
...clientOptionsOrClient,
});
if (clientOptionsOrClient.onClient) {
clientOptionsOrClient.onClient(graphqlWSClient);
Expand Down

0 comments on commit 6269314

Please sign in to comment.