You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to map the iterator results just before sending them to the subscribers.
I achieved this by using a custom deserializer.
It's the best place to do it as it is not executed if there is no subscriber and if there is, it is executed only once.
It works well except that sometimes, I need to discard the message.
Raising an exception, returning null or undefined send the message to the subscribers (raising an exception send the original message which seems weird to me).
Would you consider a PR either to add a messageTransformer option or simply a PR to ignore an undefined message.
I'm trying to map the iterator results just before sending them to the subscribers.
I achieved this by using a custom
deserializer
.It's the best place to do it as it is not executed if there is no subscriber and if there is, it is executed only once.
It works well except that sometimes, I need to discard the message.
Raising an exception, returning null or undefined send the message to the subscribers (raising an exception send the original message which seems weird to me).
Would you consider a PR either to add a
messageTransformer
option or simply a PR to ignore an undefined message.Everything would take place here: https://github.com/davidyaha/graphql-redis-subscriptions/blob/2e3704655f48ebd1f3ffaefff721f155bb134fe3/src/redis-pubsub.ts#L214C1-L225C6
Thanks!
The text was updated successfully, but these errors were encountered: