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
98
Other Decks in Technology
See All in Technology
これでもう迷わない!Jetpack Composeの書き方実践ガイド
zozotech
PRO
0
1k
開発者を支える Internal Developer Portal のイマとコレカラ / To-day and To-morrow of Internal Developer Portals: Supporting Developers
aoto
PRO
1
470
TS-S205_昨年対比2倍以上の機能追加を実現するデータ基盤プロジェクトでのAI活用について
kaz3284
1
210
AWSを利用する上で知っておきたい名前解決のはなし(10分版)
nagisa53
10
3.2k
AIエージェント開発用SDKとローカルLLMをLINE Botと組み合わせてみた / LINEを使ったLT大会 #14
you
PRO
0
130
Modern Linux
oracle4engineer
PRO
0
160
react-callを使ってダイヤログをいろんなとこで再利用しよう!
shinaps
2
260
機械学習を扱うプラットフォーム開発と運用事例
lycorptech_jp
PRO
0
590
下手な強制、ダメ!絶対! 「ガードレール」を「檻」にさせない"ガバナンス"の取り方とは?
tsukaman
2
450
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.8k
LLMを搭載したプロダクトの品質保証の模索と学び
qa
0
1.1k
Oracle Cloud Infrastructure IaaS 新機能アップデート 2025/06 - 2025/08
oracle4engineer
PRO
0
110
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
The Language of Interfaces
destraynor
161
25k
Six Lessons from altMBA
skipperchong
28
4k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Code Review Best Practice
trishagee
71
19k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Testing 201, or: Great Expectations
jmmastey
45
7.7k
Raft: Consensus for Rubyists
vanstee
140
7.1k
A better future with KSS
kneath
239
17k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
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 ◦ ◦