2 ms·
I found that GraphQL subscriptions give a great balance between trigger/signal and fat/REST events in complex environments. The events that a subscriber is int
by doctor_eval 5y ago
I found that GraphQL subscriptions give a great balance between trigger/signal and fat/REST events in complex environments.
The events that a subscriber is interested in are decorated with the exact data the subscriber specifies at subscription time, avoiding an API call while providing exactly the level of richness the client requires.
- klysm 5y agoI think the thing about the “exact level of richness required” is hugely important. It’s easy to run into the problem of needing to pull in all the data that any consumer would need (set union), but graphql allows each consumer to only grab what it needs. I’m not sure what to call this decoupling but it’s a huge win.
- doctor_eval 5y agoIt is, and because a properly built graphql backend will only fetch the data requested, the benefits of this approach extend far beyond the ergonomics of API access and can significantly improve the performance of the system. I’m a little surprised that Graphql subs aren’t more widely talked about.