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
REST_vs_GraphQL_今夜はご注文はどっち.pdf
Search
CypressKuo
February 23, 2021
Technology
25
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
REST_vs_GraphQL_今夜はご注文はどっち.pdf
CypressKuo
February 23, 2021
More Decks by CypressKuo
See All by CypressKuo
Deep-copying.pdf
cypresskuo
0
38
CSS_for_Web_Vitals.pdf
cypresskuo
0
42
談談_Code_review.pdf
cypresskuo
0
50
CSS_重構.pdf
cypresskuo
0
29
跟上_JS_的腳步-ES2020.pdf
cypresskuo
0
32
Core_Web_Vitals.pdf
cypresskuo
0
57
這個時代人人都知道的敏捷開發.pdf
cypresskuo
0
63
Webassembly.pdf
cypresskuo
0
14
談談_Functional_Programming.pdf
cypresskuo
0
32
Other Decks in Technology
See All in Technology
Platform Engineering as a Product: Criteria for Improvement and Multi-Tenant Design
kumorn5s
0
510
TypeScript Compiler APIとPHP-Parserを活用し、TypeScriptとPHPで型を共有する
shuta13
0
360
価格.comをAI駆動で全面刷新する ー 30年分の技術的負債を返し、次の30年の土台をつくる ー / AI Engineering Summit Tokyo 2026
tkyowa
50
55k
ChatworkとBPaaS 異なる特性で学んだAI機能開発の ベストプラクティス
kubell_hr
2
3k
PHP と TypeScript の型システム比較:AI 時代の「型」は誰のためにあるのか? #frontend_phpcon_do / frontend_phpcon_do_2026
shogogg
1
260
2026.06.13_AI時代に事業会社が「SIer出身エンジニア」を求める理由 / Why Businesses Seek Engineers with a System Integrator Background in the AI Era
jumtech
0
580
Terraformモジュールは、なぜ「魔境」化するのか
hayama17
1
210
AIプラットフォームを運用し続けるための可観測性
tanimuyk
4
1.1k
「嘘をつくテスト」の失敗例から学ぶ 良いテストコード #frontend_phpcon_do
asumikam
0
520
【Gen-AX】20260530開催_JJUG CCC 2026 Spring
genax
0
430
protovalidate-es を導入してみた
bengo4com
0
140
探して_入れて_作って_使う_Agent_Skills___LT.pdf
peintangos
2
170
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
ラッコキーワード サービス紹介資料
rakko
1
3.6M
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
430
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
How GitHub (no longer) Works
holman
316
150k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
350
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Designing for Timeless Needs
cassininazir
1
250
Building Adaptive Systems
keathley
44
3k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
200
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
600
Transcript
The material contained in this documentation is proprietary and confidential
to PIXNET. Copies are made available on the basis that use is limited to the sole purpose of evaluating PIXNET’s capabilities. It is not permissible to use, modify, copy or disclose any information contained in this presentation document for any other purpose without the express written permission of PIXNET. If you are not the intended recipient of this material you are requested to take immediate steps to destroy it. Copyright © 2018 PIXNET. All rights reserved. REST vs GraphQL 今夜はご注文はどっち cypresskuo @JAAD例會 2020/10/06
RESTful API 特性 • 動詞 + 受詞 • 冪等性(Idempotent) •
回傳狀態碼 • 無狀態
RESTful API 優點 • 簡單且統一的 API 接口 • 降低系統資料之間的耦合性 •
好維護、除錯(搭配 Status Code) • 實做 Cache 較簡單(冪等性)
RESTful API 缺點 • 低耦合性 -> 高鬆散 • 資料重覆 •
資料溢出
GraphQL • 2012 年 Facebook 發明了 GraphQL • 2015 年開源
• 2018 年 Facebook 將 GraphQL 項目轉移到新成立的 GraphQL 基金會(隸 屬於非營利性的 Linux 基金會)
GraphQL 特性 • 單一個 API 接口 • 始終使用 POST 請求
• 資料需求驅動設計(Driven by data requirement) • 強型別
GraphQL 特性 https://www.example.com/api/graphql
GraphQL 特性
GraphQL 優點 • 減少 Request 的次數 • 精準資料 • 無需為了多平台而設計多個
API 系統 • 前端控制權提升
GraphQL 架構
GraphQL 架構
GraphQL 架構
GraphQL 架構
GraphQL 缺點 • 規範少(易出現 Anti Pattern) • 學習成本高 • Cache
實作較難
REST vs GraphQL どっち
Q & A
Thanks for listening