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 – From zero to production
Search
Glenn Reyes
October 10, 2019
Programming
76
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React & GraphQL – From zero to production
Glenn Reyes
October 10, 2019
More Decks by Glenn Reyes
See All by Glenn Reyes
Dutch AI Conference - Building Interactive Chat Interfaces with MCP-UI
glennreyes
0
48
Advanced TypeScript for React
glennreyes
0
130
TypeScript Patterns for Better React Components
glennreyes
1
550
GraphQL for React Developers
glennreyes
0
230
When things go wrong, get errors right!
glennreyes
0
160
GraphQL for JS developers
glennreyes
1
190
Building Dapps with React
glennreyes
0
140
Third-Party or Custom Code? The Art of Software Decisions
glennreyes
0
130
UI/UX challenges of Web3 and Dapps
glennreyes
0
200
Other Decks in Programming
See All in Programming
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
200
Intent as Code
shoppingjaws
6
1.1k
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
360
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
150
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
320
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
320
FreeBSDでZabbixを動かす
kenkino
0
330
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
550
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
290
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.5k
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
210
The Rails Doctrine Decade
koic
2
400
Featured
See All Featured
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
500
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
440
A Modern Web Designer's Workflow
chriscoyier
699
190k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
76k
Thoughts on Productivity
jonyablonski
76
5.4k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
290
Product Roadmaps are Hard
iamctodd
55
13k
Building Applications with DynamoDB
mza
96
7.2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Docker and Python
trallard
47
4.2k
Transcript
@glnnrys · glennreyes.com React & GraphQL From zero to production
@glnnrys · glennreyes.com > whoami
@glnnrys · glennreyes.com Glenn Reyes Independent Software Engineer
@glnnrys · glennreyes.com Goals for today
@glnnrys · glennreyes.com Learn
@glnnrys · glennreyes.com Fun
@glnnrys · glennreyes.com Ship
@glnnrys · glennreyes.com What is GraphQL?
@glnnrys · glennreyes.com Query Language for APIs
@glnnrys · glennreyes.com Ask for what you want And get
predictable results
@glnnrys · glennreyes.com
@glnnrys · glennreyes.com A friendly reminder GraphQL is bleeding edge
technology
@glnnrys · glennreyes.com www.graphql.org
@glnnrys · glennreyes.com Describe your data
Describe your data
None
User
Tweet Tweet
User Tweet
Describe your data User Tweet
Describe your data User Tweet name email username bio age
tweets message from
@glnnrys · glennreyes.com Describe your Schema in a Type System
@glnnrys · glennreyes.com type Tweet { id: ID! message: String!
from: User } type User { name: String! email: String! bio: String age: Int tweets: [Tweet!]! username: String! }
@glnnrys · glennreyes.com Int Float String Boolean ID
@glnnrys · glennreyes.com type Query { getUser(email: String!): User! getTweets(username:
String!): [Tweet!]! } type Mutation { createTweet: Tweet deleteTweet(id: ID!): Tweet updateTweet(id: ID!): Tweet }
@glnnrys · glennreyes.com # GET something type Query { getUser(email:
String!): User! getTweets(username: String!): [Tweet!]! } # DO something type Mutation { createTweet: Tweet deleteTweet(id: ID!): Tweet updateTweet(id: ID!): Tweet }
@glnnrys · glennreyes.com # GET something type Query { #
Get a user by the email adress getUser(email: String!): User! # Get tweets getTweets(username: String!): [Tweet!]! } # DO something type Mutation { createTweet: Tweet deleteTweet(id: ID!): Tweet updateTweet(id: ID!): Tweet }
@glnnrys · glennreyes.com type Tweet { id: ID! message: String!
from: User } type User { name: String! email: String! bio: String age: Int tweets: [Tweet!]! username: String! } type Query { getUser(email: String!): User! getTweets(username: String!): [Tweet!]! } type Mutation { createTweet: Tweet deleteTweet(id: ID!): Tweet updateTweet(id: ID!): Tweet }
@glnnrys · glennreyes.com www.graphql.org
@glnnrys · glennreyes.com Ask for what you want
@glnnrys · glennreyes.com Ask for what you want And get
predictable results
@glnnrys · glennreyes.com Ask for what you want And get
predictable results
{ name twitter job expertise oss(type: "most-popular") elseIDo } {
"name": "Glenn Reyes", "twitter": "@glnnrys", "job": "Independent Software Engineer", "expertise": ["React", "GraphQL"], "oss": ["graphpack", "react-countup"], "elseIDo": [ "Co-organize React Vienna", "Speak at conferences", "Give workshops" ] }
{ name twitter job expertise oss(type: "most-popular") elseIDo } {
"name": "Glenn Reyes", "twitter": "@glnnrys", "job": "Independent Software Engineer", "expertise": ["React", "GraphQL"], "oss": ["graphpack", "react-countup"], "elseIDo": [ "Co-organize React Vienna", "Speak at conferences", "Give workshops" ] } GraphQL Query JSON
{ name twitter job expertise oss(type: "most-popular") elseIDo } {
"name": "Glenn Reyes", "twitter": "@glnnrys", "job": "Independent Software Engineer", "expertise": ["React", "GraphQL"], "oss": ["graphpack", "react-countup"], "elseIDo": [ "Co-organize React Vienna", "Speak at conferences", "Give workshops" ] } GraphQL Query JSON
{ name twitter job } { "name": "Glenn Reyes", "twitter":
"@glnnrys", "job": "Independent Software Engineer" } GraphQL Query JSON
@glnnrys · glennreyes.com What is GraphQL?
@glnnrys · glennreyes.com Query Language for APIs
@glnnrys · glennreyes.com Ask for what you want And get
predictable results
@glnnrys · glennreyes.com It's Language Agnostic
@glnnrys · glennreyes.com
@glnnrys · glennreyes.com Why GraphQL?
@glnnrys · glennreyes.com GraphQL Architecture
@glnnrys · glennreyes.com Servers Clients
@glnnrys · glennreyes.com Makes managing data difficult in the frontend
Servers Clients
@glnnrys · glennreyes.com Servers Clients GraphQL
@glnnrys · glennreyes.com Servers Clients GraphQL GraphQL handles data management
for us
@glnnrys · glennreyes.com Servers Clients GraphQL GraphQL handles data management
for us delivers us data exactly as needed
@glnnrys · glennreyes.com Servers Clients GraphQL GraphQL handles data management
for us delivers us data exactly as needed let's us focus on the frontend
@glnnrys · glennreyes.com What else?
@glnnrys · glennreyes.com Tooling
@glnnrys · glennreyes.com Query IDEs
@glnnrys · glennreyes.com github.com/graphql/graphiql
@glnnrys · glennreyes.com github.com/prisma/graphql-playground
@glnnrys · glennreyes.com Automatic Documentation
@glnnrys · glennreyes.com
@glnnrys · glennreyes.com
@glnnrys · glennreyes.com
@glnnrys · glennreyes.com const MyProfile = () => { const
{ data, loading } = useQuery(gql` { name email bio } `); if (loading) { return 'Loading ...'; } return <ProfilePage data={data} />; };
@glnnrys · glennreyes.com Questions?
@glnnrys · glennreyes.com Let's get started!
@glnnrys · glennreyes.com github.com/glennreyes/react-graphql-workshop/tree/webcamp-zagreb-2019