From 80abae4ffe8400e3a7a69022391beb09664452a5 Mon Sep 17 00:00:00 2001 From: Spartak Date: Sat, 30 May 2020 13:24:42 +0300 Subject: [PATCH] webSocketImpl for broser support wsConnectionSettings.webSocketImpl = [WS constructor] --- src/hasura/wsgql.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hasura/wsgql.js b/src/hasura/wsgql.js index e5a6e15..e337fe1 100644 --- a/src/hasura/wsgql.js +++ b/src/hasura/wsgql.js @@ -15,6 +15,7 @@ class WsGql extends EventEmitter { settings: { reconnect: true, lazy: true, + webSocketImpl: ws, }, }; this.params = mergeDeep({}, defaultParameters, parameters); @@ -50,7 +51,7 @@ class WsGql extends EventEmitter { headers, }, }, - ws, + this.params.settings.webSocketImpl, ); this.client.on('connecting', () => {