Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Intro to GraphQL
Search
Praveen Durairaj
October 05, 2019
Programming
0
22
Intro to GraphQL
Praveen Durairaj
October 05, 2019
Tweet
Share
More Decks by Praveen Durairaj
See All by Praveen Durairaj
Why GraphQL: A React Developer's Perspective
praveenweb
1
120
Other Decks in Programming
See All in Programming
アーキテクチャと考える迷子にならない開発者テスト
irof
9
3.2k
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
250
高単価案件で働くための心構え
nullnull
0
150
OSS開発者の憂鬱
yusukebe
12
5.4k
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
7
1.6k
自動テストのアーキテクチャとその理由ー大規模ゲーム開発の場合ー
segadevtech
2
1k
How Software Deployment tools have changed in the past 20 years
geshan
0
370
All(?) About Point Sets
hole
0
200
Querying Design System デザインシステムの意思決定を支える構造検索
ikumatadokoro
1
1.2k
レイトレZ世代に捧ぐ、今からレイトレを始めるための小径
ichi_raven
0
460
TVerのWeb内製化 - 開発スピードと品質を両立させるまでの道のり
techtver
PRO
3
1.1k
仕様がそのままテストになる!Javaで始める振る舞い駆動開発
ohmori_yusuke
8
4.6k
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
4.9k
Become a Pro
speakerdeck
PRO
29
5.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Music & Morning Musume
bryan
46
7k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
What's in a price? How to price your products and services
michaelherold
246
12k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Transcript
None
Intro to GraphQL - Praveen @praveenweb praveenweb
Query Language • Specification for APIs • Special Syntax •
Backend and Database agnostic • Complex data/nested relationships
Comparing to REST? • Single Endpoint (/graphql) • Schema with
Type System • Introspection • Client side tooling • Caching ?
API Call Attempt Query Params? username Street City username City
Show less data on mobile
None
None
Graph like You want to control the data you get
User: Id Name Address: Street City Orders: Id Product Product: Id Name Photo Brand Brand: Id Name Your API models are “graph” like.
GraphQL Schema: Typesystem of API type User { id: Int
name: String address: Address } type Address { id: Int street: String city: String }
Queries - Fetch data • Type • Operation Name •
Variables • Fields
Mutations • Insert • Update • Delete
Subscriptions • Realtime data • Easy to consume
Server • Define schema • Define resolvers type User {
id: Int name: String address: Address } const resolvers = { Query: { user: () => users, }, };
Query Patterns • Fetch data • Smart client side cache
• Dataloader - Batching
Query Patterns • Fragments • Reusable parts
Mutation Patterns • Insert and update cache • Optimistic update
Subscription Patterns • Polling ? • Live Queries • Notifications
(event based) • Demo
GraphQL = Unified API Layer Databases App GraphQL Server SaaS
APIs Microservices
GraphQL = Unified API Layer • Federation - Apollo •
Remote Joins - Hasura
REST Killer?
REST Killer? • GraphQL enhances REST ◦ Easy to query
◦ Self Documented ◦ Client side performance (less round trips)
GraphQL is evolving @praveenweb praveenweb