Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
};