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
99
Other Decks in Technology
See All in Technology
Introdução a Service Mesh usando o Istio
aeciopires
1
280
ゼロコード計装導入後のカスタム計装でさらに可観測性を高めよう
sansantech
PRO
1
280
データ戦略部門 紹介資料
sansan33
PRO
1
3.8k
マルチエージェントのチームビルディング_2025-10-25
shinoyamada
0
130
プレイドのユニークな技術とインターンのリアル
plaidtech
PRO
1
340
Okta Identity Governanceで実現する最小権限の原則 / Implementing the Principle of Least Privilege with Okta Identity Governance
tatsumin39
0
170
ソースを読む時の思考プロセスの例-MkDocs
sat
PRO
1
160
Dylib Hijacking on macOS: Dead or Alive?
patrickwardle
0
460
Kubernetes self-healing of your workload
hwchiu
0
490
AIプロダクトのプロンプト実践テクニック / Practical Techniques for AI Product Prompts
saka2jp
0
110
QA業務を変える(!?)AIを併用した不具合分析の実践
ma2ri
0
140
Copilot Studio ハンズオン - 生成オーケストレーションモード
tomoyasasakimskk
0
220
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
The Cult of Friendly URLs
andyhume
79
6.6k
For a Future-Friendly Web
brad_frost
180
10k
Unsuck your backbone
ammeep
671
58k
Balancing Empowerment & Direction
lara
5
700
Designing for humans not robots
tammielis
254
26k
4 Signs Your Business is Dying
shpigford
185
22k
Build your cross-platform service in a week with App Engine
jlugia
233
18k
Faster Mobile Websites
deanohume
310
31k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
890
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 ◦ ◦