@moonwalker/graphql-nats-subscriptions

0.1.7 • Public • Published

graphql-nats-subscriptions

This package implements the PubSubEngine Interface from the graphql-subscriptions package and also the new AsyncIterator interface. It allows you to connect your subscriptions manger to a nats based Pub Sub mechanism to support multiple subscription manager instances.

Usage

import { NatsPubSub } from '@moonwalker/graphql-nats-subscriptions'

const pubsub = new NatsPubSub() // default connecting to nats://localhost:4222
// or
const pubsub = new NatsPubSub({ servers: ['nats://nats.io:4222', 'nats://nats.io:5222', 'nats://nats.io:6222'] })

// for more options see: https://github.com/nats-io/node-nats

Readme

Keywords

none

Package Sidebar

Install

npm i @moonwalker/graphql-nats-subscriptions

Weekly Downloads

758

Version

0.1.7

License

MIT

Unpacked Size

30.1 kB

Total Files

8

Last publish

Collaborators

  • marlun78
  • haris.moonwalker
  • vio
  • speier
  • rucsi6
  • thetinman
  • moonwalker-bot
  • myra-moonwalker
  • moonwalkergaz
  • oisinmacgiollachuda