apollo-link-ws
Advanced tools
Comparing version 1.0.2 to 1.0.3
### 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 |
/// <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
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
16155
247
Updatedapollo-link@^1.0.6