Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apollo-link-ws

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-link-ws - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

3

CHANGELOG.md
### vNext
### 1.0.3
- export options as named interface [TypeScript]
### 1.0.2

@@ -5,0 +8,0 @@ - changed peer-dependency of apollo-link to actual dependency

15

lib/webSocketLink.d.ts
/// <reference types="zen-observable" />
import { ApolloLink, Operation, FetchResult, Observable } from 'apollo-link';
import { SubscriptionClient, ClientOptions } from 'subscriptions-transport-ws';
export declare type WebSocketParams = {
uri: string;
options?: ClientOptions;
webSocketImpl?: any;
};
export declare namespace WebSocketLink {
interface Configuration {
uri: string;
options?: ClientOptions;
webSocketImpl?: any;
}
}
export import WebSocketParams = WebSocketLink.Configuration;
export declare class WebSocketLink extends ApolloLink {
private subscriptionClient;
constructor(paramsOrClient: WebSocketParams | SubscriptionClient);
constructor(paramsOrClient: WebSocketLink.Configuration | SubscriptionClient);
request(operation: Operation): Observable<FetchResult> | null;
}
{
"name": "apollo-link-ws",
"version": "1.0.2",
"version": "1.0.3",
"description": "WebSocket transport layer for GraphQL",

@@ -44,3 +44,3 @@ "author": "Evans Hauser <evanshauser@gmail.com>",

"dependencies": {
"apollo-link": "^1.0.4"
"apollo-link": "^1.0.6"
},

@@ -58,8 +58,8 @@ "peerDependencies": {

"rimraf": "2.6.1",
"rollup": "0.52.0",
"subscriptions-transport-ws": "0.9.1",
"ts-jest": "21.2.3",
"rollup": "0.52.1",
"subscriptions-transport-ws": "0.9.4",
"ts-jest": "21.2.4",
"tslint": "5.8.0",
"typescript": "2.6.2",
"uglify-js": "3.2.0"
"uglify-js": "3.2.1"
},

@@ -66,0 +66,0 @@ "jest": {

@@ -5,12 +5,33 @@ import { ApolloLink, Operation, FetchResult, Observable } from 'apollo-link';

export type WebSocketParams = {
uri: string;
options?: ClientOptions;
webSocketImpl?: any;
};
export namespace WebSocketLink {
/**
* Configuration to use when constructing the subscription client (subscriptions-transport-ws).
*/
export interface Configuration {
/**
* The endpoint to connect to.
*/
uri: string;
/**
* Options to pass when constructing the subscription client.
*/
options?: ClientOptions;
/**
* A custom WebSocket implementation to use.
*/
webSocketImpl?: any;
}
}
// For backwards compatibility.
export import WebSocketParams = WebSocketLink.Configuration;
export class WebSocketLink extends ApolloLink {
private subscriptionClient: SubscriptionClient;
constructor(paramsOrClient: WebSocketParams | SubscriptionClient) {
constructor(
paramsOrClient: WebSocketLink.Configuration | SubscriptionClient,
) {
super();

@@ -17,0 +38,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc