From 45094fd1769747a99e3466a48f9470ed38215fb8 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Tue, 18 Apr 2017 15:48:33 -0600 Subject: [PATCH] Optimized sub model --- client/coral-framework/services/client.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/client/coral-framework/services/client.js b/client/coral-framework/services/client.js index 4673171b9..f63054413 100644 --- a/client/coral-framework/services/client.js +++ b/client/coral-framework/services/client.js @@ -4,12 +4,11 @@ import getNetworkInterface from './transport'; import {SubscriptionClient, addGraphQLSubscriptions} from 'subscriptions-transport-ws'; // TODO: replace absolute reference with something loaded from the store/page. -const wsClient = new SubscriptionClient('ws://localhost:3000/api/v1/live', { - reconnect: true -}); -const networkInterface = getNetworkInterface(); -const networkInterfaceWithSubscriptions = addGraphQLSubscriptions( - networkInterface, +// const wsClient = new SubscriptionClient('ws://localhost:3000/api/v1/live', { +// reconnect: true +// }); +const networkInterface = addGraphQLSubscriptions( + getNetworkInterface(), wsClient, ); @@ -22,7 +21,7 @@ export const client = new ApolloClient({ } return null; }, - networkInterface: networkInterfaceWithSubscriptions, + networkInterface }); export default client;