code: function getWrappedWebsocket() {
    const NativeWebSocket = window.WebSocket || window.MozWebSocket;
    const customWs = url => {
      const bearerToken = builder.getBearerToken();
      const token = bearerToken ? bearerToken.split(' ')[1] : null;
      const protocols = ['graphql-ws', token];
      return new NativeWebSocket(url, protocols);
    };
    customWs.OPEN = NativeWebSocket.OPEN;
    customWs.CONNECTING = NativeWebSocket.CONNECTING;
    customWs.CLOSED = NativeWebSocket.CLOSED;
  
    return customWs;
  }
docs: TODO: Remove this function once the PR is merged
  https://github.com/apollographql/subscriptions-transport-ws/pull/477