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
Full Stackな型安全を支えるGraphQLのFragment活用
Search
Anji.T
August 28, 2025
Programming
190
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Full Stackな型安全を支えるGraphQLのFragment活用
Anji.T
August 28, 2025
Other Decks in Programming
See All in Programming
Domain-Driven Transformation
hschwentner
2
2.3k
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
27
30k
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
Workers Cache を知る
syumai
0
360
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
440
速習iPhone Duo対応
yuukiw00w
2
990
The Rails Doctrine Decade
koic
2
580
wkhtmltopdfの次どうするか問題2026
willnet
2
1.9k
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
140
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
990
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
220
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Ethics towards AI in product and experience design
skipperchong
2
430
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
How to build a perfect <img>
jonoalderson
1
6.1k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Transcript
Full Stackな型安全を支える GraphQLのFragment活用 田中 杏直 / Tanaka Anji 2025/08/28 TsKaigi
Mashup
氏名:田中 杏直 / Tanaka Anji @anji0114 自己紹介 所属:匠技研工業 / プロダクトエンジニア
None
None
• GraphQLでの開発の流れ • データ取得の課題と Fragment • Full Stackな型安全を支える Fragment 今日お話しすること
GraphQLでの開発の流れ
スキーマの定義
バックエンド実装
GraphQL Codegen
生成されたファイル
データ取得の設計課題と Fragment
どこでデータを取得する?問題
他の設計パターン Repository + Hooks • どこでuseUserを呼ぶか? • 親で呼ぶ?子で呼ぶ?複数の場所で呼んだら 重複する? •
コンポーネント追加のたびに、親の取得内容を 都度調整
他の設計パターン Container/Presentational • どのレベルでContainerを作るか? • ページ単位?セクション単位?コンポーネント単 位?
Fragment Colocationを使用することで
子は親の取得位置を気にせず開発することできる
Full Stackな型安全を支える Fragment
None
バックエンド側で schemaを変更した時
型エラーをコンポーネントレベルで出すことができる
コンポーネントが増えた場合でも
該当コンポーネントだけを変えれば良い
まとめ • 従来の「どこでクエリを呼ぶか?」「親子で重複してない?」という判断コスト が減る。 • 各コンポーネントが必要なデータを Fragmentで宣言するため、 親の設計 や他コンポーネントの実装を知る必要がない。 •
バックエンド側で Schemaを変更時、コンポーネントレベルでコンパイルエ ラーを出してくれる。
匠技研工業ではエンジニアを募集しています!!
ありがとうございました!