Socket
Socket
Sign inDemoInstall

graphql-http-ws-client

Package Overview
Dependencies
33
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

20

createGraphQLLinks.js

@@ -35,5 +35,10 @@ import {concat, split} from "apollo-link";

const websocketImplementation = (typeof options.websocket === 'function') ? options.websocket : window.WebSocket;
subscriptionClient = new SubscriptionClient(httpURLToWS(graphQLURL), {
reconnect: true,
}, websocketImplementation);
subscriptionClient = new SubscriptionClient(httpURLToWS(graphQLURL), Object.assign(
{
reconnect: true
},
filterObject(options, ['reconnect', 'timeout', 'lazy', 'reconnect', 'reconnectionAttempts', 'connectionCallback', 'inactivityTimeout', 'connectionParams'])
), websocketImplementation);
websocketLink = new WebSocketLink(subscriptionClient);

@@ -71,3 +76,12 @@ }

subscriptionClient: subscriptionClient
};
function filterObject(rawObject, filterKeys) {
return Object.keys(rawObject)
.filter(key => filterKeys.includes(key))
.reduce((filteredObject, key) => {
filteredObject[key] = rawObject[key];
return filteredObject;
}, {});
}
}

2

package.json
{
"name": "graphql-http-ws-client",
"version": "0.1.0",
"version": "0.1.1",
"private": false,

@@ -5,0 +5,0 @@ "author": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc