apollographql / graphql-subscriptions

:newspaper: A small module that implements GraphQL subscriptions for Node.js
MIT License
1.59k stars 133 forks source link

Consider renaming "asyncIterator" to "register" #155

Open coodoo opened 6 years ago

coodoo commented 6 years ago

From a first glance of the signature

asyncIterator<T>(triggers: string | string[]): AsyncIterator<T>;

Seems it's more like a register method to add one or more event names to listen to, does it make sense to consider renaming it to just that?

grantwwu commented 5 years ago

I feel like that would make it sound like something where you attach an event handler, instead of what it actually does. Also, I don't think this is a good reason to break backwards compatibility.