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
Lightning Talk at JSConf 2015
Search
Dafeng
July 12, 2015
Programming
12
1.2k
Lightning Talk at JSConf 2015
Quick intro to GraphQL and Relay
Dafeng
July 12, 2015
Tweet
Share
More Decks by Dafeng
See All by Dafeng
Things to Know before Building Large-scale React.js Application
dfguo
6
1.9k
ReactJS in Strikingly
dfguo
6
1k
I’ ve shipped the code, what’ s next
dfguo
6
560
Other Decks in Programming
See All in Programming
Deep Dive 大規模システムアーキテクチャ/開発組織エンジニアリング / Deep Dive Large-Scale System Architecture, Development Organization Engineering
nrslib
15
2.9k
TDDと今まで
kanayannet
0
140
DocC Tutorial と TCA におけるテスト機能の紹介
kalupas226
1
330
設計の知識と技能で駆動するソフトウェア開発
masuda220
PRO
18
10k
PHP で読む楽しいコアダンプ
sji
0
240
Ruby製社内ツールのGo移行
bgpat
2
260
Creating Retro-Style Photos Using Swift
ski
1
340
Data Contracts In Practice With Debezium and Apache Flink (Kafka Summit London)
gunnarmorling
2
270
Swiftの型推論を学ぼう | Let's Learn About Type Inference in Swift
omochi
2
510
せっかくモデル図描くのなら、嬉しいことが多い方がいいよね!
kuboaki
1
1.2k
15分間でふんわり理解するDocker @ Matsuriba MAX
ukwhatn
PRO
1
330
Enhancing Applications with Accessibility API
kishikawakatsumi
3
850
Featured
See All Featured
What's new in Ruby 2.0
geeforr
335
31k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3k
Art, The Web, and Tiny UX
lynnandtonic
288
19k
Making the Leap to Tech Lead
cromwellryan
122
8.4k
YesSQL, Process and Tooling at Scale
rocio
160
13k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
8
8.2k
A designer walks into a library…
pauljervisheath
199
23k
The World Runs on Bad Software
bkeepers
PRO
60
6.6k
Designing on Purpose - Digital PM Summit 2013
jponch
109
6.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
19
1.6k
KATA
mclloyd
14
11k
Adopting Sorbet at Scale
ufuk
66
8.5k
Transcript
GraphQL and Relay Lightning Talk at JSConf 2015
About me • Dafeng Guo, CTO of strikingly.com • Strikingly
• simplest website builder • probably the largest React.js user in China
GraphQL What the hell is it?
None
None
“REST is perfect!” - A random backend engineer
REST-ful API Sometimes Sucks • Round trip for complicated objects
• Variable fields • Custom endpoint - not REST-ful design • Backend engineer dependency - slow down iterations
GraphQL • Server-side engineers published a type system • Client-side
engineers use GraphQL as a unified query interface • No more adhoc endpoints • Product changes are faster
None
Are we writing SQL in the client?! NO!
GraphQL Query JSON Response
GraphQL • REST-ful sometimes sucks • GraphQL is declarative •
GraphQL allows product engineers to iterate faster • Draft spec was released
Relay GraphQL on React
Component • Component is at the core of React •
Reusing any component, we are reusing • HTML - React • Javascript - React • CSS - Maybe React? • Data fetching - Relay
Relay • Allows you to define the data format the
component needs using GraphQL • Relay automatically fetch the data • Supports nested/composite components
Relay • Solving the data fetching problem • Supports composite
components • Makes component reuse possible • Will be open sourced in August
Thanks!