graphql-http-ws-client
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -82,3 +82,2 @@ import { InMemoryCache } from '@apollo/client/cache/cache.cjs'; | ||
if(mergedOptions.createHTTPLink) { | ||
const authLink = mergedOptions.httpLinkOptions?.setContext | ||
@@ -108,3 +107,2 @@ ? setContext(mergedOptions.httpLinkOptions?.setContext) | ||
const wsLinkOptions = { | ||
@@ -115,3 +113,2 @@ reconnect: true, | ||
connectionParams: async (...args) => { // add subprotocol | ||
console.log("CP"); | ||
const params = mergedOptions.wsLinkOptions?.connectionParams | ||
@@ -122,10 +119,2 @@ ? await mergedOptions.wsLinkOptions?.connectionParams(...args) | ||
// merge in subprotocol headers | ||
console.log("SENDING", { | ||
...params, | ||
headers: { | ||
"sec-websocket-protocol": wsSubprotocol, | ||
...params.headers | ||
} | ||
}); | ||
return { | ||
@@ -132,0 +121,0 @@ ...params, |
@@ -1246,9 +1246,3 @@ var __create = Object.create; | ||
var _a2, _b2; | ||
console.log("CP"); | ||
const params = ((_a2 = mergedOptions.wsLinkOptions) == null ? void 0 : _a2.connectionParams) ? await ((_b2 = mergedOptions.wsLinkOptions) == null ? void 0 : _b2.connectionParams(...args)) : {}; | ||
console.log("SENDING", __spreadProps(__spreadValues({}, params), { | ||
headers: __spreadValues({ | ||
"sec-websocket-protocol": wsSubprotocol | ||
}, params.headers) | ||
})); | ||
return __spreadProps(__spreadValues({}, params), { | ||
@@ -1255,0 +1249,0 @@ headers: __spreadValues({ |
{ | ||
"name": "graphql-http-ws-client", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -26,3 +26,2 @@ import { getMainDefinition } from "@apollo/client/utilities/utilities.cjs"; | ||
if(mergedOptions.createHTTPLink) { | ||
const authLink = mergedOptions.httpLinkOptions?.setContext | ||
@@ -52,3 +51,2 @@ ? setContext(mergedOptions.httpLinkOptions?.setContext) | ||
const wsLinkOptions = { | ||
@@ -59,3 +57,2 @@ reconnect: true, | ||
connectionParams: async (...args) => { // add subprotocol | ||
console.log("CP"); | ||
const params = mergedOptions.wsLinkOptions?.connectionParams | ||
@@ -66,10 +63,2 @@ ? await mergedOptions.wsLinkOptions?.connectionParams(...args) | ||
// merge in subprotocol headers | ||
console.log("SENDING", { | ||
...params, | ||
headers: { | ||
"sec-websocket-protocol": wsSubprotocol, | ||
...params.headers | ||
} | ||
}); | ||
return { | ||
@@ -76,0 +65,0 @@ ...params, |
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
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
116745
2997