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
satoya
April 06, 2020
Programming
0
120
GraphQL が仲間になりたそうにこちらを見ている
GraphQL 入門。(主に「初めての GraphQL 」を読んで分かったことをまとめたもの。)
satoya
April 06, 2020
Tweet
Share
More Decks by satoya
See All by satoya
GraphQL + Golang でのクエリ最適化
somen440
0
92
Other Decks in Programming
See All in Programming
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
990
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
750
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
210
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
800
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
200
SourceGeneratorのススメ
htkym
0
200
Data-Centric Kaggle
isax1015
2
780
CSC307 Lecture 05
javiergs
PRO
0
500
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
140
AgentCoreとHuman in the Loop
har1101
5
250
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
150
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.7k
Featured
See All Featured
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
79
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
58
50k
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Producing Creativity
orderedlist
PRO
348
40k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3k
Transcript
GraphQL が仲間になりたそう にこちらを見ている 仲間にしてあげますか? satoya@Somen440
GraphQL 雑コラ
はい →いいえ
なんか英語 グラフってなんだよ 何に使われてんの? どう便利?? 実際、何使えばいいのか 本番運用で使えるんか? etc
GraphQL ??
GraphQL
GraphQL
Graph (グラフ) Graph ってなんだ … ??
Graph • 情報を視覚的に二次元で表したもの • 接点と枝(頂点と辺)からなる構造
None
組織図
迷路
色々なものがグラフとして表現できる モシカシタラ ワタシタチ ノ サービ ス モ グラフ デ ヒョウゲン
デキ ルンチャウ? ※画像はイメージです。
None
\ こうして GraphQL の基盤が出来た / より詳細は、O'Reilly「初めてのGraphQL」など。 Facebook が作ったよ!
• 問い合わせ言語 ◦ クライアント → サーバー(DB)に問い合わせる • SQLと親戚(≠血縁関係) 救急箱には、「傷薬、絆 創膏、包帯があるよ。」
傷薬だけください クライアント サーバー QL(Query Language)
- サーバーが持つ「こういう救急箱があるよ」という仕様 - .gql, .graphql など
Playground で簡単動作確認 Prisma 制作のツール。Postman の GraphQL 版のようなもの。
None
更新 リソース更新はこんな感じ
でも、難しい実装が必要で学習コスト高 いんでしょ?
大丈夫です!
99designs/gqlgen (golang) 実装例 Query に対応した Resolver を実装するだけ!
その他機能 • ファイルアップロード • サブスクリプション ◦ ユーザーの追加をリアルタイムに検知のようなやつ • カスタムスカラー型 ◦
よく見るのが Time 型とか 全仕様は GitHub で管理されてる →https://github.com/graphql/graphql-spec 99designs/gqlgen の仕様追従状況 →https://gqlgen.com/feature-comparison/ 仕様追従的なところとかコミュニティが一番盛り上がってるのは Apollo (NodeJS)とか →https://www.apollographql.com/
実際使われてるサービス(公式より)
REST API とか gRPC の窓口として合わせて使うアー キテクチャもあったり
本番での運用は大丈夫? • 認証は? ◦ ヘッダー認証 • todo の user の
todo の user の … みたいな 悪意のあるクエリ対策は? ◦ クエリ自体の複雑度を数値化して制限を設けるライ ブラリあり ◦ 階層自体にも制限を設けることもできる
GraphQLに興味が出てきたんじゃないで しょうか!? もうちょっとだけ続くんじゃ
GraphQL 雑コラ
→はい いいえ
Enjoy GraphQL