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.3k
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
1.1k
I’ ve shipped the code, what’ s next
dfguo
6
630
Other Decks in Programming
See All in Programming
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
330
バグを見つけた?それAppleに直してもらおう!
uetyo
0
180
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
210
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
クリエイティブコーディングとRuby学習 / Creative Coding and Learning Ruby
chobishiba
0
3.9k
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
1
260
Haze - Real time background blurring
chrisbanes
1
510
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
110
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
350
ドメインイベント増えすぎ問題
h0r15h0
2
290
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
130
Go の GC の不得意な部分を克服したい
taiyow
2
780
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Faster Mobile Websites
deanohume
305
30k
Unsuck your backbone
ammeep
669
57k
Writing Fast Ruby
sferik
628
61k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
YesSQL, Process and Tooling at Scale
rocio
169
14k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Side Projects
sachag
452
42k
A Modern Web Designer's Workflow
chriscoyier
693
190k
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!