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
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
ChromeでローカルLLM
ryu1013
0
190
パスワード再設定メールのURLについて知っておこう
uyuki234
0
200
Spec-driven Development with AI
simas
PRO
0
2.2k
GraphQL の onError と Nullability のこれから
quramy
0
200
Inertia Rails: The One-Person Framework with React & Friends
skryukov
0
200
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.9k
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
110
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
7.1k
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
330
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
190
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
3
2.3k
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
210
Featured
See All Featured
BBQ
matthewcrist
90
10k
WENDY [Excerpt]
tessaabrams
14
40k
Code Review Best Practice
trishagee
74
20k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Building Applications with DynamoDB
mza
96
7.3k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
Scaling GitHub
holman
464
140k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Optimising Largest Contentful Paint
csswizardry
37
4k
The Limits of Empathy - UXLibs8
cassininazir
2
750
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
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
モックサーバー