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
React+Graphqlで快適スキーマ駆動開発
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
takuma.n
June 04, 2023
Programming
190
0
Share
React+Graphqlで快適スキーマ駆動開発
React+Graphqlの開発体験がすごくいいので、皆さんも試してみてください。
takuma.n
June 04, 2023
More Decks by takuma.n
See All by takuma.n
現場に寄り添い、価値を届けるチーム開発プロセス
takumamiyazawa
0
1.3k
プロダクトエンジニア一年生のしくじり 〜フリーランスがプロダクトエンジニアになるまで〜
takumamiyazawa
0
900
Other Decks in Programming
See All in Programming
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
850
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
1.8k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
450
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
160
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
150
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
1
220
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
120
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
150
Making the RBS Parser Faster
soutaro
0
590
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
1.6k
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
810
実践CRDT
tamadeveloper
0
600
Featured
See All Featured
Believing is Seeing
oripsolob
1
120
Color Theory Basics | Prateek | Gurzu
gurzu
0
300
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
540
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
Six Lessons from altMBA
skipperchong
29
4.2k
Become a Pro
speakerdeck
PRO
31
5.9k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Paper Plane
katiecoart
PRO
1
49k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
Transcript
React + Graphqlで 快適スキーマ駆動開発
自己紹介 宮沢 趣味:ラップバトル観戦、ポーカー 基本Typescriptを触ってます
フォローしてね🐣
今日話すこと Graphqlを使ったスキーマ駆動開発の流れと 改善されること Reactとの親和性 一般的なサービス開発の流れと問題点
一般的なサービス開発の 流れと問題点
APIできたら繋ぎこみ APIで受け取る値は ハードコーディング Swaggerなどで API定義書用意 API開発進める サーバーサイド フロントエンド
フロントが後手に回りがち🥲 Swaggerの仕様と 実際のAPIが違くね?🤔 Swagger(yml)書きにくい🤮
Graphqlを使った場合
.graphqlによる API定義書が書きやすい
スキーマ ファイル を定義
.graphqlファイル書く API定義(Swagger) + モックサーバー + 型
モックサーバー
モックサーバーと繋ぐことで フロントはハードコーディン グせずに済む!
フロントとサーバー両方とも Typescriptなら
.graphqlから型生成して その型をAPI側とフロント側 で共有することで 乖離がなくなる
ここからReact絡めたお話
Graphql Code Generater
こいつがすごい
Graphqlの定義ファイル TypeScriptの型 React Hooks + ↓
実際のコードで見てみよう
フォローしてね🐣
https://zenn.dev/tackman/articles/9a49e53315b83d
モックサーバー