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
920
Other Decks in Programming
See All in Programming
Are We Really Coding 10× Faster with AI?
kohzas
0
230
自動レビューエンジンの実装と運用 ~レビューのない世界へ~
kurukuru1999
2
250
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
290
Swiftのレキシカルスコープ管理
kntkymt
0
190
関係性から理解する"同一性"の型用語たち
pvcresin
2
520
1人1案件のプロダクトエンジニア時代に、"プロセス監督"としてチャレンジしたこと
non0113
0
290
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
0
320
横断組織出身のQAEがインプロセスQAEでつまずいたこと・活かせたこと
ty89
0
180
ビジネスモデルから紐解く、AI+型駆動開発
hirokiomote
2
1.9k
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
150
Talking to terminals (and how they talk back) (KotlinConf 2026)
jakewharton
PRO
1
110
AgentCore Optimizationを始めよう!
licux
4
280
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
240
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
380
KATA
mclloyd
PRO
35
15k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
510
The browser strikes back
jonoalderson
0
1.1k
Side Projects
sachag
455
43k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Documentation Writing (for coders)
carmenintech
77
5.3k
Discover your Explorer Soul
emna__ayadi
2
1.1k
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
モックサーバー