graphql-subscriptions-continued
Advanced tools
Comparing version 3.0.1 to 3.0.2
export { PubSubEngine } from './pubsub-engine'; | ||
export { PubSub, PubSubOptions } from './pubsub'; | ||
export { PubSubAsyncIterableIterator } from './pubsub-async-iterable-iterator'; | ||
export { withFilter, ResolverFn, FilterFn } from './with-filter'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.withFilter = exports.PubSub = exports.PubSubEngine = void 0; | ||
exports.withFilter = exports.PubSubAsyncIterableIterator = exports.PubSub = exports.PubSubEngine = void 0; | ||
var pubsub_engine_1 = require("./pubsub-engine"); | ||
@@ -8,4 +8,6 @@ Object.defineProperty(exports, "PubSubEngine", { enumerable: true, get: function () { return pubsub_engine_1.PubSubEngine; } }); | ||
Object.defineProperty(exports, "PubSub", { enumerable: true, get: function () { return pubsub_1.PubSub; } }); | ||
var pubsub_async_iterable_iterator_1 = require("./pubsub-async-iterable-iterator"); | ||
Object.defineProperty(exports, "PubSubAsyncIterableIterator", { enumerable: true, get: function () { return pubsub_async_iterable_iterator_1.PubSubAsyncIterableIterator; } }); | ||
var with_filter_1 = require("./with-filter"); | ||
Object.defineProperty(exports, "withFilter", { enumerable: true, get: function () { return with_filter_1.withFilter; } }); | ||
//# sourceMappingURL=index.js.map |
import { PubSubEngine } from './pubsub-engine'; | ||
export declare class PubSubAsyncIterableIterator<T> implements AsyncIterableIterator<T> { | ||
private pullQueue; | ||
private options; | ||
private pushQueue; | ||
@@ -9,3 +10,3 @@ private eventsArray; | ||
private pubsub; | ||
constructor(pubsub: PubSubEngine, eventNames: string | readonly string[]); | ||
constructor(pubsub: PubSubEngine, eventNames: string | readonly string[], options?: unknown); | ||
next(): Promise<IteratorResult<T>>; | ||
@@ -12,0 +13,0 @@ return(): Promise<IteratorResult<T>>; |
@@ -41,4 +41,5 @@ "use strict"; | ||
var PubSubAsyncIterableIterator = (function () { | ||
function PubSubAsyncIterableIterator(pubsub, eventNames) { | ||
function PubSubAsyncIterableIterator(pubsub, eventNames, options) { | ||
this.pubsub = pubsub; | ||
this.options = options; | ||
this.pullQueue = []; | ||
@@ -150,3 +151,3 @@ this.pushQueue = []; | ||
var _this = this; | ||
return Promise.all(this.eventsArray.map(function (eventName) { return _this.pubsub.subscribe(eventName, _this.pushValue.bind(_this), {}); })); | ||
return Promise.all(this.eventsArray.map(function (eventName) { return _this.pubsub.subscribe(eventName, _this.pushValue.bind(_this), _this.options); })); | ||
}; | ||
@@ -153,0 +154,0 @@ PubSubAsyncIterableIterator.prototype.unsubscribeAll = function (subscriptionIds) { |
{ | ||
"name": "graphql-subscriptions-continued", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "GraphQL subscriptions for node.js, with modern Typescript types", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62669
388