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
Efficient development with GraphQL
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
murajun1978
October 13, 2019
Programming
330
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Efficient development with GraphQL
My talk at GraphQL Osaka 2019
murajun1978
October 13, 2019
More Decks by murajun1978
See All by murajun1978
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
1.3k
How to Enjoy the Murajun’s Style
murajun1978
0
100
Building Tebukuro with Hotwire and Rails
murajun1978
0
1.5k
Zeitwerk integration in Rails 6.0
murajun1978
0
140
Effective Debugging Apps in VS Code
murajun1978
1
990
tebukuro
murajun1978
0
140
Shinosaka.rb #17 Hands on
murajun1978
0
72
New Features in Rails 4.2
murajun1978
0
960
shinosakarb #11 Rails 4 Pattenrs
murajun1978
1
180
Other Decks in Programming
See All in Programming
Inside Stream API
skrb
1
680
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
OSもどきOS
arkw
0
480
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.6k
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
250
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
230
Modding RubyKaigi for Myself
yui_knk
0
910
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
150
Webフレームワークの ベンチマークについて
yusukebe
0
160
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
180
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3.5k
Featured
See All Featured
Practical Orchestrator
shlominoach
191
11k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
280
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
310
The Spectacular Lies of Maps
axbom
PRO
1
800
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.7k
So, you think you're a good person
axbom
PRO
2
2.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Documentation Writing (for coders)
carmenintech
77
5.4k
A designer walks into a library…
pauljervisheath
211
24k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Transcript
Efficient development with GraphQL GraphQL Osaka 2019
{ me: { name, avatar, jobs, communities } } {
me: { name: “murajun1978”, avatar: , jobs: [“Web developer”], communties: [ “Shinosaka.rb”, “Rails Follow-up Osaka”, “Osaka Web Developers Meetup”, “Open Source Software Developers Osaka” ] } }
リーンソフトウェア開発 • ムダを排除する • 知識を作り出す • 決定をできるだけ遅らせる • できるだけ早く提供する •
チームに権限を移譲する • 全体を最適化する • 品質を作り込む
いかに効率よく最速で かつ 必要最低限のコストで 高品質なアプリケーションを 継続的に開発できるのか
ムダを排除する
アプリケーションを開発するたびに フロントエンドで バックエンドAPIのClientを作る
まじめんどくさいし コストもかかる
Apollo GraphQL
Apollo Server • GraphQL.jsベースのGraphQL Server • Web Frameworkに対応 ◦ Express
◦ Koa ◦ Hapi ◦ Hastify ◦ Amazon Lambda ◦ Micro ◦ Azure Functions ◦ Google Cloud Functions • OSS
Apollo Server Demo
アプリケーションを開発するたびに フロントエンドで バックエンドAPIのClientを作る
GraphQL Code Generator https://graphql-code-generator.com/
GraphQL Code Generator • GraphQLのschemaから型定義やクライアント用のコードを生成 • ResolverのTypeScript型定義 • React Apolloのコード生成
• 他にもpluginがある ◦ https://graphql-code-generator.com/docs/plugins/
GraphQL Code Generator Demo
できるだけ早く提供する
バックエンドの開発が終わるまで フロントエンドの開発に着手できない もしくは できるけど手戻りがあったりする
Mocking
Apollo Server Mocking • Apollo Serverをモックサーバにできる • 実装が終わったResolverを順次適用していくことができる
Apollo Server Mocking Demo
品質を作り込む ✨
Apollo Server Integration Testing • 結合テスト用のクライアントを提供 • Jestのスナップショットを使って、Apollo Serverの振る舞いをテストする
Apollo Server Integration Testing Demo
開発初期は資金も不足がち 最低限のインフラコストで運用したい
Apollo Serverは関係ない?
Apollo ServerはServerlessとお友達です
Google Cloud Functions
Google Cloud Functions • Googleのサーバレスコンピューティング • 毎月無料枠があって、お金がないプロジェクトにはやさしい料金体系 • Node.js v8,
v10 (beta) 環境で実行できる • Firebase Toolsで簡単デプロイ
Firebase Hosting
Firebase Hosting • Googleのホスティングサービス • CloudflareなどのCDNに配信できる • Firebase Toolsで簡単デプロイ
まとめ • GraphQL Code Generatorで型定義、クライアントコードを自動生成してくれるの で、めんどうな実装やコストを削減できる • 開発初期はモックサーバとして活用し、実装が終わったResolverを適用していくこ とができるので、フロントエンドとバックエンドが同時に開発できる •
フロントエンド、バックエンドともTypeScriptでかけるので、学習コストを抑えることが できる • Serverlessで動作可能なので、インフラコストも削減できる • 運用面でもServerlessはメリット大です
Thank you