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
5分で分かった気になれるGraphQLの話
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
starling888888
November 23, 2019
Programming
390
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
5分で分かった気になれるGraphQLの話
2019-11-23 に行われたDevfest in 信州2019 のLTで発表したスライド
starling888888
November 23, 2019
More Decks by starling888888
See All by starling888888
明日から使おうGitLab入門
ryouehara
0
1k
Other Decks in Programming
See All in Programming
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
260
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
360
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
370
速習iPhone Duo対応
yuukiw00w
1
710
JRuby: Past, Present, and Future
headius
0
170
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
180
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
150
Security issues being discussed on Web Platforms
petamoriken
0
1k
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
300
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
220
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
190
Java 27新機能 / Java 27 new features
kishida
2
150
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
From π to Pie charts
rasagy
1
380
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Odyssey Design
rkendrick25
PRO
2
810
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
GraphQLとの向き合い方2022年版
quramy
50
15k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
230
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
910
Accessibility Awareness
sabderemane
1
220
Fireside Chat
paigeccino
43
4k
Transcript
5分で分かった気になれる GraphQLの話 2019-11-23 on Devfest in 信州2019
whoami? Ryo Uehara(@starling8+) ▪ 県内某社のWebエンジニア(新米) ▪ DockerとNodeJSがメインスタック ▪ プライベートではUbuntuとHaskellい じってる
▪ アカウントの8の数は使ってるサービス で変わります 2
1 What is GraphQL? 3
What is GraphQL? 4 ▪ ポストRESTAPIとして注目されているWebAPIの規格 ▪ ネストしたリソースやRESTであれば複数のエンドポイ ントへのリクエストを一回のリクエストで取得できる ▪
複雑なエンドポイントやクエリパラメータを定義するこ となく、必要なフィールドのみをクライアントで取得す ることが可能
What is GraphQL? 従来のRESTモデル 5 出典:https://www.sitepoint.com/rest-2-0-graphql/
What is GraphQL? GraphQLモデル 6 出典:https://www.sitepoint.com/rest-2-0-graphql/
2 Basics of GraphQL 7
Basics of GraphQL ~server side~ TypeDefs ▪ 返すオブジェクトやインプット の型を定義 8
Basics of GraphQL ~server side~ TypeDefs ▪ Queryにデータ取得のエンドポ イントを定義 ▪
Mutationにデータ操作のエン ドポイントを定義 9
Basics of GraphQL ~server side~ Resolvers ▪ Query, Mutationのリクエス トハンドラーを実装
10
Basics of GraphQL ~client side~ Query usage ▪ 必要なフィールドを指定して queryを作成
▪ `/graphql`エンドポイントに POSTメソッドでqueryを送信 11
Basics of GraphQL ~client side~ FrameWork ▪ Client FrameWork(Apollo, Relay...)がうまいこと
loading, errorのハンドリン グやキャッシュをやってくれる 12
3 Good DX 13
Good DX ~graphiql~ ドキュメントビューとクエリを試せるGUIが組み込み済み 14
Good DX ~versioning~ ▪ バージョン管理をしないで済む ▫ 新しく型定義を追加すれば良い ▫ 破壊的変更は非推奨 ▫
削除する場合は非推奨項目であることを示すメタデータ を付与して、使われなくなったら削除 15
4 Conclusion 16
Conclusion GraphQLは ▪ かんたん! ▪ はやい! ▪ たのしい! 17
Thanks! Happy coding with GraphQL! You can find me at:
@starling888888 on Twitter 18
出典 画像出典:https://www.sitepoint.com/rest-2-0-graphql/ コード出典:https://github.com/apollographql/fullstack-tutorial 19
CREDITS Special thanks to all the people who made and
released these awesome resources for free: ▪ Presentation template by SlidesCarnival ▪ Photographs by Unsplash 20