@graphql-tools/executor-graphql-ws
Advanced tools
Comparing version 1.2.1 to 1.3.0-alpha-20240925195618-76a963d2812a0cd2c8dab7afc36a51c77cbb0aad
@@ -24,4 +24,13 @@ "use strict"; | ||
} | ||
const webSocketImpl = clientOptionsOrClient.headers | ||
? class WebSocketWithHeaders extends isomorphic_ws_1.default { | ||
constructor(url, protocol) { | ||
super(url, protocol, { | ||
headers: clientOptionsOrClient.headers, | ||
}); | ||
} | ||
} | ||
: isomorphic_ws_1.default; | ||
graphqlWSClient = (0, graphql_ws_1.createClient)({ | ||
webSocketImpl: isomorphic_ws_1.default, | ||
webSocketImpl, | ||
lazy: true, | ||
@@ -28,0 +37,0 @@ ...clientOptionsOrClient, |
@@ -20,4 +20,13 @@ import { print } from 'graphql'; | ||
} | ||
const webSocketImpl = clientOptionsOrClient.headers | ||
? class WebSocketWithHeaders extends WebSocket { | ||
constructor(url, protocol) { | ||
super(url, protocol, { | ||
headers: clientOptionsOrClient.headers, | ||
}); | ||
} | ||
} | ||
: WebSocket; | ||
graphqlWSClient = createClient({ | ||
webSocketImpl: WebSocket, | ||
webSocketImpl, | ||
lazy: true, | ||
@@ -24,0 +33,0 @@ ...clientOptionsOrClient, |
{ | ||
"name": "@graphql-tools/executor-graphql-ws", | ||
"version": "1.2.1", | ||
"version": "1.3.0-alpha-20240925195618-76a963d2812a0cd2c8dab7afc36a51c77cbb0aad", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -7,4 +7,8 @@ import { print } from 'graphql'; | ||
print?: typeof print; | ||
/** | ||
* Additional headers to include when querying the original schema | ||
*/ | ||
headers?: Record<string, string>; | ||
} | ||
export declare function buildGraphQLWSExecutor(clientOptionsOrClient: GraphQLWSExecutorOptions | Client): DisposableExecutor; | ||
export {}; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8926
154
2