From Zero to #graphql Subscriptions
▻https://hackernoon.com/from-zero-to-graphql-subscriptions-416b9e0284f3?source=rss----3a8144eabf
In this blog post, I’ll cover the theory, implementation, and challenges of building GraphQL Subscriptions from scratch.In case you are unfamiliar with GraphQL, here’s a primer: GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL was open-sourced in 2015, and the subscription operation (added to the spec in 2017) allows you to subscribe to real-time data in GraphQL. GraphQL Subscriptions power a number of features on Facebook, including live comments and streaming reactions on live videos. If you’d like a more thorough overview GraphQL, check out graphql.org. Imagine we are building an email client with two basic features:When the user starts the application, fetch and display all emails in the inbox. For each email, display (...)