Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Real-time API's with GraphQL
Search
Sandeep Singh
October 14, 2018
Research
1
350
Real-time API's with GraphQL
Sandeep Singh
October 14, 2018
Tweet
Share
More Decks by Sandeep Singh
See All by Sandeep Singh
NDC OSLO 2017
initialspark
1
180
DDD 12 - Goodbye REST; Hello GraphQL
initialspark
0
1.2k
DDDSouthwest - JavascriptServices: Building Single Page Applications with ASP.NET Core
initialspark
0
87
NDC London 2017 - Bundling Your front end with webpack
initialspark
0
160
Other Decks in Research
See All in Research
VectorLLM: Human-like Extraction of Structured Building Contours via Multimodal LLMs
satai
4
500
CVPR2025論文紹介:Unboxed
murakawatakuya
0
220
Multi-Agent Large Language Models for Code Intelligence: Opportunities, Challenges, and Research Directions
fatemeh_fard
0
110
AIスパコン「さくらONE」の オブザーバビリティ / Observability for AI Supercomputer SAKURAONE
yuukit
2
990
「どう育てるか」より「どう働きたいか」〜スクラムマスターの最初の一歩〜
hirakawa51
0
1k
Open Gateway 5GC利用への期待と不安
stellarcraft
2
160
[Devfest Incheon 2025] 모두를 위한 친절한 언어모델(LLM) 학습 가이드
beomi
2
990
機械学習と数理最適化の融合 (MOAI) による革新
mickey_kubo
1
430
Pythonでジオを使い倒そう! 〜それとFOSS4G Hiroshima 2026のご紹介を少し〜
wata909
0
1.2k
SNLP2025:Can Language Models Reason about Individualistic Human Values and Preferences?
yukizenimoto
0
220
多言語カスタマーインタビューの“壁”を越える~PMと生成AIの共創~ 株式会社ジグザグ 松野 亘
watarumatsuno
0
170
Vision and LanguageからのEmbodied AIとAI for Science
yushiku
PRO
1
600
Featured
See All Featured
Site-Speed That Sticks
csswizardry
13
1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.3k
Statistics for Hackers
jakevdp
799
230k
Documentation Writing (for coders)
carmenintech
76
5.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Automating Front-end Workflow
addyosmani
1371
200k
Agile that works and the tools we love
rasmusluckow
331
21k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
54k
Building Adaptive Systems
keathley
44
2.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.6k
Fireside Chat
paigeccino
41
3.7k
Transcript
Real-Time API’s with GraphQL Sandeep Singh initialspark.co.uk @initial_spark
◦ What is GraphQL ? ◦ Why it exists and
the problems it aims to solve ? ◦ GraphQL core concepts ◦ Real-Time API’s – the what, why and how Agenda @initial_spark
GraphQL is a declarative query language for your API @initial_spark
@initial_spark
◦Built on specification ◦Hierarchical ◦Client‐driven ◦Strongly typed What is GraphQL?
@initial_spark
Q: Why GraphQL? @initial_spark
◦Efficiency ◦Predictability ◦Versioning ◦Caching ◦Security, tooling, documentation and more Modern
API considerations @initial_spark
Let’s look at an example… @initial_spark
@initial_spark
Efficiency @initial_spark
Efficiency @initial_spark GraphQL API Mongo DB AWS Lamba REST API
SOAP Service HTTP TCP/IP HTTP SOAP Optimisted data for each channel
Versioning Evolution @initial_spark
Tooling & DX @initial_spark
Introspection { __schema{ types{ name } } } • Query
schema, types and fields • Build tools o Auto complete / Validate (graphiql) o Code generation o Documentation @initial_spark
GraphQL Core Concepts @initial_spark
Schema Type System Query Language GraphQL Core Concepts @initial_spark
GraphQL Core Concepts - Resolvers @initial_spark
Schema Type System Query Language o Operations • Queries –
read • Mutations – write • Subscriptions – real-time o Alias o Fragments GraphQL Core Concepts @initial_spark
Lets build a GraphQL API! @initial_spark
@initial_spark
◦ Unpredictable Execution ◦ Handling File Upload ◦ Cache at
Network Level ◦ Authentication/Authorisation GraphQL - Challenges @initial_spark
Q:What about Real-time data? @initial_spark
@initial_spark Chat Notifications Live feed Collaborative
◦ Pull ◦ Polling - Short/Long - HTTP ◦ Push
◦ Subscriptions - Event driven ◦ Live queries - Infinitely fast/cheap polling (State driven) Real-Time API’s @initial_spark
◦ Real time events ◦ Idea: Server pushes data to
client when something ‘interesting’ occurs ◦ The client defines the shape of the data pushed to it Subscriptions – Event Based @initial_spark
◦ The initial state is large, but the incremental change
sets are small ◦ You care about low-latency updates in the case of specific events, e.g. chat application where users expect to receive new messages in a matter of seconds Subscriptions – When to use @initial_spark
Subscriptions Implementation @initial_spark
Subscriptions (Redis, Kafka, MQ, own?) @initial_spark Request / Response Bi-Directional
Transport (SSE, websockets etc) HTTP Subscription(s) GraphQL Domain Events Events
@initial_spark
Let’s look at another example… @initial_spark
@initial_spark GraphQL API Run Mutation Trigger Subscription subscription {patientDischarged{…}} PAS
View (Admin) Ward View (Nurse)
Lets have some fun with subscriptions @initial_spark
Advanced features – Enrich payload @initial_spark
@initial_spark There isn’t such thing as a free lunch…
◦ Scaling state is hard ◦ Who’s subscribed/ how do
we send messages etc ◦ QOS ◦ Throttling ◦ Buffering Subscriptions - Challenges @initial_spark
◦ http://graphql.org/learn/ ◦ https://www.youtube.com/watch?v=bn8qsi8jVew - Lee Byron ◦ https://github.com/apollographql/apollo-client ◦
https://github.com/initialspark/real-time-apis-graphql ◦ https://www.graphqlhub.com/ ◦ https://www.youtube.com/watch?v=4_Bcw7BULC8 - Authentication Resources @initial_spark
Thank you ! You can find me at @initial_spark &
initialspark.co.uk