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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
takuma.n
June 04, 2023
Programming
190
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.3k
プロダクトエンジニア一年生のしくじり 〜フリーランスがプロダクトエンジニアになるまで〜
takumamiyazawa
0
950
Other Decks in Programming
See All in Programming
RTSPクライアントを自作してみた話
simotin13
0
520
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
500
Oxlintのカスタムルールの現況
syumai
6
1.1k
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
750
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
5.3k
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
110
Swiftのレキシカルスコープ管理
kntkymt
0
220
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
670
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
190
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
150
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
540
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
200
Featured
See All Featured
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
410
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
RailsConf 2023
tenderlove
30
1.5k
ラッコキーワード サービス紹介資料
rakko
1
3.6M
Abbi's Birthday
coloredviolet
2
8k
Embracing the Ebb and Flow
colly
88
5.1k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
300
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.4k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
720
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
210
The Cult of Friendly URLs
andyhume
79
6.9k
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
モックサーバー