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入門
Search
K.Mori
January 29, 2020
Technology
1
100
GraphQL入門
社内勉強会での資料です。 #GraphQL #RESTful #SOAP
K.Mori
January 29, 2020
Tweet
Share
More Decks by K.Mori
See All by K.Mori
#DeStudy #01 Rust入門
morikyon
0
95
Other Decks in Technology
See All in Technology
Model Mondays S2E02: Model Context Protocol
nitya
0
220
Claude Code Actionを使ったコード品質改善の取り組み
potix2
PRO
6
2.1k
PHPでWebブラウザのレンダリングエンジンを実装する
dip_tech
PRO
0
200
20250625 Snowflake Summit 2025活用事例 レポート / Nowcast Snowflake Summit 2025 Case Study Report
kkuv
1
290
標準技術と独自システムで作る「つらくない」SaaS アカウント管理 / Effortless SaaS Account Management with Standard Technologies & Custom Systems
yuyatakeyama
3
1.2k
Azure AI Foundryでマルチエージェントワークフロー
seosoft
0
180
「Chatwork」の認証基盤の移行とログ活用によるプロダクト改善
kubell_hr
1
120
本当に使える?AutoUpgrade の新機能を実践検証してみた
oracle4engineer
PRO
1
140
mrubyと micro-ROSが繋ぐロボットの世界
kishima
2
150
OpenHands🤲にContributeしてみた
kotauchisunsun
1
410
~宇宙最速~2025年AWS Summit レポート
satodesu
1
1.8k
解析の定理証明実践@Lean 4
dec9ue
0
170
Featured
See All Featured
Being A Developer After 40
akosma
90
590k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Git: the NoSQL Database
bkeepers
PRO
430
65k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Adopting Sorbet at Scale
ufuk
77
9.4k
Code Review Best Practice
trishagee
68
18k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Transcript
GraphQL K.Mori (@forestython)
あGraphQL ◦ ◦ ◦ ◦ API ◦
API い
API い ◦ API: Application Programming Interface ◦ あ ◦
あ Google Maps ◦ 1 OK ◦ …
Request 。
Response …
SOAP
SOAP ◦ SOAP: ◦ Simple Object Access Protocol ◦ ◦
あ XML ◦ あHTTP OK ◦ あ ◦
SOAP ◦ ◦ ◦ ◦ BtoB ◦ ◦ XML ◦
◦ REST
<SOAP-ENV:Envelope xmlns:SOAP- ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <getBooks xmlns="http://hogehoge.com/books"> <BookId>810</BookId> </getBooks> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
<SOAP-ENV:Envelope xmlns:SOAP- ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <getBooksResponse xmlns="http://warehouse.example.com/ws"> <getBooksResult> <BookName>Ocha no hon</BookName> <BookId>810</BookId> <author>Ocha-Hakase</author> <price>1000</price> </getBooksResult> </getBooksResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> あ ID Request Response
RESTful API
RESTful API ◦ RESTful API: REST Web HTTP ◦ REST:
Representational State Transfer ◦ ◦ Stateless ◦ URI Addressability ◦ HTTP Uniform Interface ◦ 、 Connectability ◦
post 」 RESTfulあ /diary get
」 RESTfulあ … /Postdiary /Getdiary
RESTful API ◦ Response ◦ あ API ◦ Response ◦
◦ ◦ ◦ ISBN ◦ ◦ ◦ URI あ7 ◦ …
RESTful API ◦ ◦ あ API ◦ Response ◦ ◦
◦ ◦ ISBN ◦ ◦ ◦ URI あ7 ◦ 7 API い
RESTful API ◦ ◦ あ API ◦ Response ◦ ◦
◦ ◦ ISBN ◦ ◦ ◦ URI あ7 ◦ ◦ ◦ 3 ◦ … API
GraphQL
GraphQL ◦ 2012 Facebook ◦ 2015 9 4 ◦ REST
Web API ◦ Facebook Twitter, GitHub, Airbnb, New York Times, Netflix Web ◦ ◦ …い
GraphQL ◦ HTTP ◦ ◦ ◦ ◦ ◦ 1
GraphQL ◦ ◦ あ API ◦ ◦ ID =334
Request query { book(authorID:334) { authorName writtenBooks { books {
title price } } } } authorID=334 authorName: books: ➔ title( ) price( )
Response 3 { "data": { "book": { "authorName": "Hanshin Taro",
"writtenBooks": { "books": [ { "title": "Baseball Hero vol.1", "price": 1200 }, { "title": "Baseball Hero vol.6", "price": 1200 }, { "title": "Baseball Hero vol.7", "price": 1800 } ] } } } } { "title": "Baseball Hero vol.2", "price": 1200 }, { "title": "Baseball Hero vol.3", "price": 1300 }, { "title": "Baseball Hero vol.4", "price": 1200 }, { "title": "Baseball Hero vol.5", "price": 1400 }, SOAP い
◦ ◦ ◦ 「 ◦ post 「 ◦ 「 ◦
GraphQL json json …
あ ”Graph” ◦ Graph Graph ◦ ◦ (Directed Acyclic Graph)
◦ (Directed Tree) ◦ 0 ◦ 1 ◦
”Graph” query { book(authorID:334) { authorName writtenBooks { books {
title price } } } } Query book authorName writtenBooks books price title
◦ GraphQL SOAP REST ◦ ◦