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
GraphQL - JavaScript Fullstack Solution
Search
Michael Hsu
December 29, 2017
Programming
2
300
GraphQL - JavaScript Fullstack Solution
GitHub:
https://github.com/evenchange4/todomvc-subscriptions
Demo:
https://todomvc-web.now.sh/
Michael Hsu
December 29, 2017
Tweet
Share
More Decks by Michael Hsu
See All by Michael Hsu
Front-End Practice 2019
evenchange4
0
870
Other Decks in Programming
See All in Programming
物語を動かす行動"量" #エンジニアニメ
konifar
14
5.6k
『リコリス・リコイル』に学ぶ!! 〜キャリア戦略における計画的偶発性理論と変わる勇気の重要性〜
wanko_it
1
610
学習を成果に繋げるための個人開発の考え方 〜 「学習のための個人開発」のすすめ / personal project for leaning
panda_program
1
110
兎に角、コードレビュー
mitohato14
0
160
Ruby Parser progress report 2025
yui_knk
1
220
tool ディレクティブを導入してみた感想
sgash708
1
150
UbieのAIパートナーを支えるコンテキストエンジニアリング実践
syucream
2
770
Portapad紹介プレゼンテーション
gotoumakakeru
1
130
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
750
Nuances on Kubernetes - RubyConf Taiwan 2025
envek
0
210
STUNMESH-go: Wireguard NAT穿隧工具的源起與介紹
tjjh89017
0
390
ソフトウェアテスト徹底指南書の紹介
goyoki
1
120
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
How GitHub (no longer) Works
holman
315
140k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
Designing Experiences People Love
moore
142
24k
Why Our Code Smells
bkeepers
PRO
339
57k
Transcript
GRAPHQL - JAVASCRIPT FULLSTACK SOLUTION 2017.12.29 MICHAEL HSU
AGENDA 1. Recap 2. Server 3. Web
RECAP API GATEWAY - PROXY
RECAP GRAPHQL NATIVE - CONNECT TO DATABASE
DEMO ▸ TodoMVC: CRUD + Realtime ▸ https://todomvc-web.now.sh/
TODOMVC - FULLSTACK . (lerna) !"" packages #"" constants #
Shared constants between client and server. #"" server # GraphQL Server !"" web # Web server
SERVER
HOW TO BUILD A GRAPHQL SERVER? (1/3) GRAPHQL OPERATION ▸
Query: R ▸ Mutation: CUD ▸ Subscription: Realtime (WS, MQTT) ▸ https://todomvc-server.now.sh/
HOW TO BUILD A GRAPHQL SERVER? (2/3) LIBRARIES ‣ 1.
graphql-yoga: express, graphql-tools, graphql- subscriptions, graphiql ‣ 2. knex.js: ORM ‣ 3. Pkg: Binary compiler ‣ 4. Docker: Container
HOW TO BUILD A GRAPHQL SERVER? (3/3) MODULE ▸ 1.
connector: connect to database ▸ 2. models: ORM, database manipulate ▸ 3. typeDefs: GraphQL type ▸ 4. resolver: Logic ▸ https://github.com/evenchange4/todomvc-subscriptions/ blob/master/packages/server/README.md
WEB
HOW TO BUILD A GRAPHQL WEB? (1/2) LIBRARIES ▸ 1.
Next.js: Server-rendered React applications ▸ 2. Apollo-client: GraphQL client ▸ 3. Apollo-link-state: Manage local state (redux)
HOW TO BUILD A GRAPHQL WEB? (2/2) MODULE ▸ 1.
gql: GraphQL type ▸ 2. hoc: React ▸ 3. resolvers: GraphQL for local state (getState, reducer) ▸ https://github.com/evenchange4/todomvc-subscriptions/ blob/master/packages/web/README.md
SERVER & WEB CONCLUSION - SIZE ▸ Server: Linux binary
64MB ▸ Web: bundle size 433KB + 101KB (Code split)
FULLSTACK TODOMVC WITH GRAPHQL SUBSCRIPTIONS https://github.com/evenchange4/todomvc-subscriptions TAKEAWAY