How to use the subscriptions-transport-ws/dist/client.SubscriptionClient function in subscriptions-transport-ws

To help you get started, we’ve selected a few subscriptions-transport-ws examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github revskill10 / next-template / modules / core / api / create-link.js View on Github external
function createWsClient(clientName, context) {
  const { urlMap, connParams } = context
  const subUrl = urlMap[clientName].subUri
  return new SubscriptionClient(subUrl, {
    connectionParams: connParams,
    reconnect: true,
  }, WebSocket)
}
github revskill10 / next-template / packages / server / create-link.js View on Github external
function createWsClient(clientName, context) {
  const { urlMap, connParams } = context
  const subUrl = urlMap[clientName].subUri
  return new SubscriptionClient(subUrl, {
    connectionParams: connParams,
    reconnect: true,
  }, WebSocket)
}