How to use graphql-nats-subscriptions - 1 common examples

To help you get started, we’ve selected a few graphql-nats-subscriptions 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 cdmbase / fullstack-pro / servers / backend-server / src / modules / pubsub.ts View on Github external
export const pubsubGen = () => {

    if (!pubsubInstance) {
        pubsubInstance = config.NODE_ENV === 'development' ?
            config.apolloLogging ? wrapPubSub(new PubSub(), { logger: logger.trace.bind(logger) }) :
                new PubSub() : new NatsPubSub({ client: clientGen(), logger });
    }

    return pubsubInstance;
};

graphql-nats-subscriptions

This package implements the PusSubEngine Interface from the graphql-subscriptions package. It allows you to connect your subscriptions manger to an NATS enabled Pub Sub broker to support horizontally scalable subscriptions setup. This package is an adap

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis

Popular graphql-nats-subscriptions functions

Similar packages