@rxdi/graphql-rabbitmq-subscriptions 0.7.205 → 0.7.207

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,7 @@ export declare class AmqpPubSub {
21
21
  subscribe<T>(trigger: string, onMessage: (m: T) => Promise<void>, options?: Partial<IQueueNameConfig>): Promise<number>;
22
22
  unsubscribe(subId: number): void;
23
23
  asyncIterator<T>(triggers: string | string[], options?: IQueueNameConfig): AsyncIterator<T>;
24
+ asyncIterableIterator<T>(triggers: string | string[], options?: IQueueNameConfig): AsyncIterator<T>;
24
25
  private onMessage;
25
26
  }
26
27
  export type Path = Array<string | number>;
@@ -111,9 +111,14 @@ class AmqpPubSub {
111
111
  this.subscriptionMap.delete(subId);
112
112
  this.logger.trace("list of subscriptions still available '(%j)'", Array.from(this.subscriptionMap.entries()));
113
113
  }
114
+ /* Old version before 3.0.0 of async iterator inside graphql-subscriptions */
114
115
  asyncIterator(triggers, options) {
115
116
  return new pubsub_async_iterator_1.PubSubAsyncIterator(this, triggers, options);
116
117
  }
118
+ /* New version of graphql-subscriptions async iterator */
119
+ asyncIterableIterator(triggers, options) {
120
+ return new pubsub_async_iterator_1.PubSubAsyncIterator(this, triggers, options);
121
+ }
117
122
  onMessage(channel, message) {
118
123
  return __awaiter(this, void 0, void 0, function* () {
119
124
  const subscribers = this.subsRefsMap.get(channel);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxdi/graphql-rabbitmq-subscriptions",
3
- "version": "0.7.205",
3
+ "version": "0.7.207",
4
4
  "description": "A graphql-subscriptions PubSub Engine using RabbitMQ",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -24,7 +24,7 @@
24
24
  "lint": "tslint ./src/**/*.ts"
25
25
  },
26
26
  "dependencies": {
27
- "@rxdi/rabbitmq-pubsub": "^0.7.204",
27
+ "@rxdi/rabbitmq-pubsub": "^0.7.206",
28
28
  "graphql-subscriptions": "^3.0.0"
29
29
  },
30
30
  "devDependencies": {