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
Why GraphQL: A React Developer's Perspective
Search
Praveen Durairaj
May 19, 2018
Programming
1
95
Why GraphQL: A React Developer's Perspective
React Bangalore Meetup May 2018
Praveen Durairaj
May 19, 2018
Tweet
Share
More Decks by Praveen Durairaj
See All by Praveen Durairaj
Intro to GraphQL
praveenweb
0
19
Other Decks in Programming
See All in Programming
CSC509 Lecture 12
javiergs
PRO
0
160
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
Quine, Polyglot, 良いコード
qnighy
4
650
Click-free releases & the making of a CLI app
oheyadam
2
120
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.2k
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
980
みんなでプロポーザルを書いてみた
yuriko1211
0
280
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
140
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
CSC509 Lecture 13
javiergs
PRO
0
110
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
230
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
334
57k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Building Adaptive Systems
keathley
38
2.3k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Code Review Best Practice
trishagee
64
17k
For a Future-Friendly Web
brad_frost
175
9.4k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Building Applications with DynamoDB
mza
90
6.1k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Automating Front-end Workflow
addyosmani
1366
200k
Transcript
Why GraphQL: A React Developer’s Perspective
Hello! I am Praveen Durairaj Application Engineer - Hasura twitter.com/praveenweb
github.com/praveenweb 2
What is GraphQL • Query Language • Declarative, Type safe
• Server-side runtime • Better REST ? 3
• Type-safe schema with introspection • Endpoint is the same
- /graphql • Always fetch what you want • Versioning made easy Let that sink in! 4
const typeDefs = ` type CityWeather { temp: String min_temp:
String max_temp: String city_name: String! applicable_date: String! } type Query { cityWeather(city_name: String! applicable_date: String): CityWeather } `; 5
• Type-safe schema with introspection • Endpoint is the same
- /graphql • Always fetch what you want • Versioning made easy Let that sink in! 6
7
• Type-safe schema with introspection • Endpoint is the same
- /graphql • Always fetch what you want • Versioning made easy Let that sink in! 8
• Type-safe schema with introspection • Endpoint is the same
- /graphql • Always fetch what you want • Versioning made easy Let that sink in! 9
10
11 How is the Developer Workflow?
API Explorer Query Validation Caching Developer Tooling Autocomplete Mocking Predictable
12
API Explorer GraphiQL Know what you can request Code intelligence
13
Validation & Autocomplete Autocomplete during development Query validation 14
15 DEMO
Caching - Leverage unique identifiers for client side caching -
Directives with Apollo Server 16
Response Caching 17
Schema Stitching - Merge multiple graphql schemas into a single
endpoint - Extend existing schema 18
19
20 - Person Schema - Extend it with weather -
Merge and query
Downsides? - Exposing db / api schema to client -
Managing schema - Moving the load server side 21
22 Thanks! Any questions? You can find me at @praveenweb
&
[email protected]