From 24202dec44b274fb2965fde7ac581acf70bab947 Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 22 Apr 2017 15:40:35 +0100 Subject: [PATCH] fix(NA): removed useless addGraphQLWS function. --- src/helpers.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/helpers.ts b/src/helpers.ts index e7d82d4e9..feb75b8f0 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,5 +1,4 @@ -import { SubscriptionClient, ClientOptions } from './client'; -import { ExecutionResult } from 'graphql'; +import { SubscriptionClient } from './client'; /** * @deprecated This method will become deprecated in the new package graphql-transport-ws. @@ -21,16 +20,3 @@ export function addGraphQLSubscriptions(networkInterface: any, wsClient: Subscri }, }); } - -export function addGraphQLWS(networkInterface: any, wsClientOptions: ClientOptions): any { - if (typeof networkInterface._uri !== 'string') { - throw new Error('Given networkInterface should have an uri defined to config the websocket.'); - } - - const wsClient = new SubscriptionClient(networkInterface._uri, wsClientOptions); - return Object.assign(addGraphQLSubscriptions(networkInterface, wsClient), { - query(request: any): Promise { - return wsClient.query(request); - }, - }); -}