Implementing GraphQL Subscriptions with RxJS

1 · Daniel Schmidt · July 19, 2019, 12:18 p.m.
I recently had to bootstrap a project with a GraphQL frontend and backend using Apollo. We wanted to show realtime updates of metrics we collect from an endpoint. For this, we wanted to use GraphQL Subscriptions, specifically graphql-subscriptions, but I noticed they use AsyncIterables as an abstraction for a stream of data. I used RxJS for the same purpose in the past and I like the abstractions it provides over asynchronicity and how it plays together with Typescript.I would like to show you h...