graphql-subscriptions-continued
Advanced tools
Comparing version 3.0.2 to 3.0.3
export { PubSubEngine } from './pubsub-engine'; | ||
export { PubSub, PubSubOptions } from './pubsub'; | ||
export { PubSubAsyncIterableIterator } from './pubsub-async-iterable-iterator'; | ||
export { withFilter, ResolverFn, FilterFn } from './with-filter'; | ||
export { withFilter, WithFilter, ResolverFn, FilterFn } from './with-filter'; |
export type FilterFn<TSource = any, TArgs = any, TContext = any> = (rootValue?: TSource, args?: TArgs, context?: TContext, info?: any) => boolean | Promise<boolean>; | ||
export type ResolverFn<TSource = any, TArgs = any, TContext = any> = (rootValue?: TSource, args?: TArgs, context?: TContext, info?: any) => AsyncIterator<any> | Promise<AsyncIterator<any>>; | ||
export type WithFilter<TSource = any, TArgs = any, TContext = any> = (asyncIteratorFn: ResolverFn<TSource, TArgs, TContext>, filterFn: FilterFn<TSource, TArgs, TContext>) => ResolverFn<TSource, TArgs, TContext>; | ||
export type ResolverFn<TSource = any, TArgs = any, TContext = any> = (rootValue?: TSource, args?: TArgs, context?: TContext, info?: any) => AsyncIterableIterator<any> | Promise<AsyncIterableIterator<any>>; | ||
export type WithFilter = typeof withFilter; | ||
export declare function withFilter<TSource = any, TArgs = any, TContext = any>(asyncIteratorFn: ResolverFn<TSource, TArgs, TContext>, filterFn: FilterFn<TSource, TArgs, TContext>): ResolverFn<TSource, TArgs, TContext>; |
@@ -43,3 +43,3 @@ "use strict"; | ||
return function (rootValue, args, context, info) { return __awaiter(_this, void 0, void 0, function () { | ||
var asyncIterator, getNextPromise, asyncIterator2; | ||
var asyncIterator, getNextPromise; | ||
var _a; | ||
@@ -80,18 +80,17 @@ return __generator(this, function (_b) { | ||
}; | ||
asyncIterator2 = (_a = { | ||
next: function () { | ||
return getNextPromise(); | ||
return [2, (_a = { | ||
next: function () { | ||
return getNextPromise(); | ||
}, | ||
return: function () { | ||
return asyncIterator.return(); | ||
}, | ||
throw: function (error) { | ||
return asyncIterator.throw(error); | ||
} | ||
}, | ||
return: function () { | ||
return asyncIterator.return(); | ||
_a[Symbol.asyncIterator] = function () { | ||
return this; | ||
}, | ||
throw: function (error) { | ||
return asyncIterator.throw(error); | ||
} | ||
}, | ||
_a[Symbol.asyncIterator] = function () { | ||
return this; | ||
}, | ||
_a); | ||
return [2, asyncIterator2]; | ||
_a)]; | ||
} | ||
@@ -98,0 +97,0 @@ }); |
{ | ||
"name": "graphql-subscriptions-continued", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"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
62483
387