apollographql / graphql-subscriptions

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

Allow to pass symbols as event names #175

Open guillaumervls opened 5 years ago

guillaumervls commented 5 years ago

Hi and thanks for this package,

Node's EventEmitters allows symbols as event names, it would be nice to be able to use them here as well. The problematic line is here https://github.com/apollographql/graphql-subscriptions/pull/174 (for now workaround is to pass a symbol as a 1-length array). I'm not familiar with TypeScript though, so I guess there is typing stuff to adapt...

Cheers

grantwwu commented 5 years ago

I don't think this is something that would be useful, considering that the EventEmitter implementation isn't intended for production use anyways.