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
React+Graphqlで快適スキーマ駆動開発
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
takuma.n
June 04, 2023
Programming
210
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React+Graphqlで快適スキーマ駆動開発
React+Graphqlの開発体験がすごくいいので、皆さんも試してみてください。
takuma.n
June 04, 2023
More Decks by takuma.n
See All by takuma.n
現場に寄り添い、価値を届けるチーム開発プロセス
takumamiyazawa
0
1.5k
プロダクトエンジニア一年生のしくじり 〜フリーランスがプロダクトエンジニアになるまで〜
takumamiyazawa
0
1.1k
Other Decks in Programming
See All in Programming
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
110
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
280
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
140
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
150
AWSに止められる覚悟してますか?
morizo_1984
2
530
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.6k
最近”作らせてる” ローカルAIアプリの話
akit37
0
440
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
400
Kubernetes祭り #2 OP/ED
bells17
0
110
mrbgem 三角測量 開発
ogom
0
230
Featured
See All Featured
From π to Pie charts
rasagy
1
390
What's in a price? How to price your products and services
michaelherold
247
13k
Are puppies a ranking factor?
jonoalderson
2
4k
Six Lessons from altMBA
skipperchong
29
4.5k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
Discover your Explorer Soul
emna__ayadi
2
1.3k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Making the Leap to Tech Lead
cromwellryan
135
10k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
740
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
880
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.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
モックサーバー