79302860

Date: 2024-12-23 11:01:18
Score: 0.5
Natty:
Report link

Seems like new version of graphql-subscription uses asyncIterableIterator, so correct usage is:

 return pubSub.asyncIterableIterator('chatSent');

This is noticeable by inspecting type definitions:

PubSub extends PubSubEngine

PubSubEngine class implements:

asyncIterableIterator<T>(triggers: string | readonly string[]): PubSubAsyncIterableIterator<T>;

In npm package "graphql-subscriptions", both asyncIterator and asyncIterableIterator are used (description is probably not updated).

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: justdvl