Skip to content

Commit 491e77c

Browse files
committed
enhance(url-loader): start legacy subscriptions connection lazily
1 parent 07e12ce commit 491e77c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/stupid-cats-sing.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-tools/url-loader': patch
3+
---
4+
5+
enhance(url-loader): start legacy subscriptions connection lazily

packages/loaders/url/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ export class UrlLoader implements DocumentLoader<LoadFromUrlOptions> {
368368
url: WS_URL,
369369
webSocketImpl,
370370
connectionParams,
371+
lazy: true,
371372
});
372373
return async ({ document, variables }: { document: DocumentNode; variables: any }) => {
373374
const query = print(document);
@@ -401,6 +402,7 @@ export class UrlLoader implements DocumentLoader<LoadFromUrlOptions> {
401402
WS_URL,
402403
{
403404
connectionParams,
405+
lazy: true,
404406
},
405407
webSocketImpl
406408
);

0 commit comments

Comments
 (0)