graphql-pg-subscriptions
Advanced tools
Comparing version 2.0.5 to 3.0.0
@@ -7,2 +7,3 @@ import { Client, ClientConfig } from "pg"; | ||
client?: Client, | ||
maxListeners?: number; | ||
} | ||
@@ -9,0 +10,0 @@ |
{ | ||
"name": "graphql-pg-subscriptions", | ||
"version": "2.0.5", | ||
"version": "3.0.0", | ||
"description": "", | ||
@@ -33,5 +33,5 @@ "main": "index.js", | ||
"devDependencies": { | ||
"graphql": "^16.6.0", | ||
"pg": "^8.11.0" | ||
"graphql": "^16.8.1", | ||
"pg": "^8.11.5" | ||
} | ||
} |
@@ -12,3 +12,3 @@ const { PubSub } = require("graphql-subscriptions"); | ||
constructor(options = {}) { | ||
const { commonMessageHandler, client, ...pgOptions } = options; | ||
const { commonMessageHandler, client, maxListeners = 15, ...pgOptions } = options; | ||
super(); | ||
@@ -20,2 +20,3 @@ this.client = client || new Client(pgOptions); | ||
this.ee = new pgIPC(this.client); | ||
this.ee.setMaxListeners(maxListeners); | ||
this.subscriptions = {}; | ||
@@ -22,0 +23,0 @@ this.subIdCounter = 0; |
18035
309