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
110
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
100
Other Decks in Technology
See All in Technology
データの整合性を保ちたいだけなんだ
shoheimitani
8
3k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
170
FinTech SREのAWSサービス活用/Leveraging AWS Services in FinTech SRE
maaaato
0
130
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
310
制約が導く迷わない設計 〜 信頼性と運用性を両立するマイナンバー管理システムの実践 〜
bwkw
3
890
AWS Network Firewall Proxyを触ってみた
nagisa53
0
160
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
190
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
0
330
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1.4k
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
4 Signs Your Business is Dying
shpigford
187
22k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
430
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
160
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
The Curious Case for Waylosing
cassininazir
0
230
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Site-Speed That Sticks
csswizardry
13
1.1k
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 ◦ ◦