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
260
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
810
Other Decks in Programming
See All in Programming
Native Federation: The Future of Micro Frontends in Angular
manfredsteyer
PRO
0
140
2024 コーディング研修
ckazu
1
540
From Spring Boot 2 to Spring Boot 3 with Java 21 and Jakarta EE
ivargrimstad
0
970
TypeScriptコードの漸進的改善 / Progressive Improvement of TypeScript Code
medley
1
140
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
570
PHPはいつから死んでいるかの調査
chiroruxx
2
440
Criando a Woovi em uma semana
daniloab
0
110
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
360
GitLab CI/CD で C#/WPFアプリケーションのテストとインストーラーのビルド・デプロイを自動化する
hacarus
0
540
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
690
TSKaigi 2024 - 新サービス Progate Path の演習で TypeScript を採用して見えた教材観点からの利点と課題
makotoshimazu
1
150
CREってこういうこと? 体験入社 - 提案資料 - / what-is-cre-trial-employment
shinden
1
590
Featured
See All Featured
The Language of Interfaces
destraynor
151
23k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
0
73
XXLCSS - How to scale CSS and keep your sanity
sugarenia
242
1.2M
How to train your dragon (web standard)
notwaldorf
75
5.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
Documentation Writing (for coders)
carmenintech
60
4k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Docker and Python
trallard
35
2.7k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
126
32k
How GitHub (no longer) Works
holman
305
140k
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