Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Expose WS implementation options #1324

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/apollo-link-ws/src/webSocketLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ export namespace WebSocketLink {
* A custom WebSocket implementation to use.
*/
webSocketImpl?: any;


/**
* Passed in as the second option of the WebSocket implementation.
* On the browser it is wsProtocols but in Node it's implementation specific.
*/
webSocketImplOptions?: any;
}
}

Expand All @@ -42,6 +49,7 @@ export class WebSocketLink extends ApolloLink {
paramsOrClient.uri,
paramsOrClient.options,
paramsOrClient.webSocketImpl,
paramsOrClient.webSocketImplOptions,
);
}
}
Expand Down