Skip to content
A graphql subscriptions implementation using nats and apollo's graphql-subscriptions
Branch: master
Clone or download
Latest commit 81f335c Nov 22, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src cleanup Nov 22, 2018
.editorconfig initial commit 🎉 Oct 26, 2017
.gitignore publish package Nov 14, 2017
.npmignore publish package Nov 14, 2017
LICENSE initial commit 🎉 Oct 26, 2017
README.md update graphql subscriptions Nov 22, 2018
package.json 📦 release 0.1.7 Nov 22, 2018
rollup.config.js publish package Nov 14, 2017
tsconfig.json tsc config ES2015 Nov 22, 2018
yarn.lock update graphql subscriptions Nov 22, 2018

README.md

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
You can’t perform that action at this time.