Lunch Talks #1: Real-time GraphQL
At Codegram we love continuous training so every day after lunch we watch a video from many tech conferences about different topics. Usually these videos are picked randomly by one of us based on some personal criteria.
In order to improve this we decided every two weeks a person should prepare a list of three or four videos about one topic. Then, at the end of the week we have a small meeting to discuss the videos and extract some ideas for our projects.
This week the topic was "Realtime GraphQL" and we watched the following videos:
Introducing GraphQL Subscriptions - Lee Byron
(40 minutes) https://www.youtube.com/watch?v=bn8qsi8jVew
In this video Lee Byron explains the idea behind GraphQL Subscriptions. He talks about the Subscription specification without entering in implementation details.
Rodrigo Muñoz - GraphQL Live: Reactive Queries at Facebook
(29 minutes) https://www.youtube.com/watch?v=BSw05rJaCpA
Another specification to work with real time GraphQL are "Live Queries". GraphQL Subscriptions are event based and can be implemented with a stateless server. On the other hand, Live Queries are state based and they need a stateful server.
GraphQL Live Queries - Stephen Wan @ GraphQL Europe 2018
(18 minutes) https://www.youtube.com/watch?v=g-asVW9JFPw
Finally, in this talk both previous technologies are used in production. Stephen Wan explains some implementation details and also some pros and cons between two options.
We are really excited about GraphQL Subscriptions so we have decided to start using them in our applications where real time matters. Live Queries sounds awesome too but the cost of implementing the stateful server is a big issue for us. Both technologies have their own use cases but we are going to use GraphQL Subscriptions for now.
Stay tuned for our future updates and follow us to watch a curated list of videos every week!