Brodcasting single message to all subscribers #423
mentos1386
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Hey there, this is more of a general GraphQL issue rather than graphql-ws specific. graphql-ws is just a transport. You can create a pubsub that is globally shared for the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I'm thininking of an usecase where clients can subscribe to
heartbeat
like this:We would like to all subscribers to send the exactly the same
heartbeat
objects. There is no problems that we would be "leaking" information as this is a subscription that is intentional public and available for everyone with content that is the same for everyone.What I'm afraid is, if we have 100 subscribers and send a single message, we will be processing (calling "resolve" functions) 100 times for each subscriber. Even though the outcome for each subscriber will be the same.
We want to avoid getting our "resolve" methods being called 100 times if they could only be called once.
Maybe in the way graphql-ruby mentions?
Beta Was this translation helpful? Give feedback.
All reactions