From 0d141e7472cfc03f6301d7a779b73098404d2849 Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Wed, 8 Feb 2017 14:12:17 -0700 Subject: [PATCH] explicit return for clarity --- .../coral-framework/services/subscriptions.js | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/client/coral-framework/services/subscriptions.js b/client/coral-framework/services/subscriptions.js index f514ea18b..818a6fb33 100644 --- a/client/coral-framework/services/subscriptions.js +++ b/client/coral-framework/services/subscriptions.js @@ -1,14 +1,16 @@ import {print} from 'graphql-tag/printer'; // quick way to add the subscribe and unsubscribe functions to the network interface -const addGraphQLSubscriptions = (networkInterface, wsClient) => Object.assign(networkInterface, { - subscribe: (request, handler) => wsClient.subscribe({ - query: print(request.query), - variables: request.variables, - }, handler), - unsubscribe: (id) => { - wsClient.unsubscribe(id); - }, -}); +const addGraphQLSubscriptions = (networkInterface, wsClient) => { + return Object.assign(networkInterface, { + subscribe: (request, handler) => wsClient.subscribe({ + query: print(request.query), + variables: request.variables, + }, handler), + unsubscribe: (id) => { + wsClient.unsubscribe(id); + }, + }); +}; export default addGraphQLSubscriptions;