Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
REST_vs_GraphQL_今夜はご注文はどっち.pdf
Search
CypressKuo
February 23, 2021
Technology
31
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
REST_vs_GraphQL_今夜はご注文はどっち.pdf
CypressKuo
February 23, 2021
Transcript
17 slides
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
More Decks by CypressKuo
See All by CypressKuo
Deep-copying.pdf
cypresskuo
0
45
CSS_for_Web_Vitals.pdf
cypresskuo
0
52
談談_Code_review.pdf
cypresskuo
0
57
CSS_重構.pdf
cypresskuo
0
37
跟上_JS_的腳步-ES2020.pdf
cypresskuo
0
43
Core_Web_Vitals.pdf
cypresskuo
0
65
這個時代人人都知道的敏捷開發.pdf
cypresskuo
0
93
Webassembly.pdf
cypresskuo
0
24
談談_Functional_Programming.pdf
cypresskuo
0
36
Other Decks in Technology
See All in Technology
社内アプリ基盤「Quartz」による、 非エンジニアとAIに本番デプロイを 任せても壊れないプラットフォームの設計
staka121
PRO
1
390
NutanixへのSSHアクセスの今後について
shadowhat
0
190
メルカリの小規模チーム「Pod」で、 エンジニアがデータアナリストなしで、 AIを使ってデータ分析の自走を目指す取り組み
jackojacko_
1
400
Well, that’s weird…
csswizardry
3
260
その修正で本当に速くなったのか? k6とOpenTelemetryで確かめる性能改善 / Performance review with k6 and OpenTelemetry
ymotongpoo
3
490
40以上のマイクロサービスを支えるKubernetes JITアクセス — 160以上の恒久RoleBindingを削減
jumpe1
0
120
Go でトランザクション、どう書いてますか?
knwoop
2
670
コーディングできない僕にBobが舞い降りた
shumpei3
0
230
猫でもわかるKiro初心者編(2026年11月版)
kentapapa
1
130
一口馬主の募集馬をAIで診断してみた
yoshimura_datam
0
130
統制されたID・権限をどう利用するか : DPoP/FAPIによるAPIセキュリティ強化
oidfj
2
370
デザインシステムのフィードバックループをほぼ自動化した話
tongari07
1
1.4k
Featured
See All Featured
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.5k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
710
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
370
Why Our Code Smells
bkeepers
PRO
340
58k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
830
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
630
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
330
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Deep Space Network (abreviated)
tonyrice
0
430
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
660
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k