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
GraphQL & beyond
Search
Felipe Luiz Soares
November 17, 2018
Technology
0
57
GraphQL & beyond
Felipe Luiz Soares
November 17, 2018
Tweet
Share
More Decks by Felipe Luiz Soares
See All by Felipe Luiz Soares
Writing unit tests with Jest using test best practices
felipesoares6
0
190
Comecei uma tarefa e olha no que deu!
felipesoares6
0
56
HTML + CSS
felipesoares6
1
150
THE MEANING OF LIFE FRONT-END USER EXPERIENCE AND EVERYTHING
felipesoares6
0
64
BEM
felipesoares6
0
74
Read-Search-Ask
felipesoares6
1
94
Other Decks in Technology
See All in Technology
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
190
Agile Leadership Summit Keynote 2026
m_seki
1
620
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
5
5.6k
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.3k
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
140
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
今日から始めるAmazon Bedrock AgentCore
har1101
4
410
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
770
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
590
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
200
量子クラウドサービスの裏側 〜Deep Dive into OQTOPUS〜
oqtopus
0
120
Cosmos World Foundation Model Platform for Physical AI
takmin
0
900
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
190
Code Reviewing Like a Champion
maltzj
527
40k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
50
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
110
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
We Have a Design System, Now What?
morganepeng
54
8k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
68
Transcript
GRAPHQL & beyond @felipesoares_
why how when
@felipesoares6_ felipesoares6
None
None
None
None
GraphQL is a query language
& alternative to REST
None
+
graphs -> nodes -> edges
query language SELECT * FROM
type House { edge: Person } type Person { ...
}
why?
None
3 reasons
get just what you want
enables declarative data fetching
overfetching
underfetching
nice and smooth contracts
+ typed schemas + docs
playground
clients everywhere
only exposes a single endpoint
consume the same endpoint in != ways
how?
-> schema -> queries -> mutations -> resolvers -> responses
schema
type Query { users: [User!]!, user: User! }
type User { id: ID!, name: String, email: String }
schema -> queries -> mutations resolvers responses
queries
GET /users query { users { id, name, email }
}
mutations
POST /users mutation { createUser( name: “Felipeson”, email: “
[email protected]
” )
{ id } }
schema queries mutations -> resolvers responses
resolvers
resolvers = { Query: { users: () => getUsers(), user:
(_, { id }) => getUser(id), ???: () => fetch(‘api.com/top’) } }
schema queries mutations resolvers -> responses
responses
loading
“data”: { users: [ { id: “1”, name: “Felipe Soares”,
email: “
[email protected]
” } ] } query { users { id, name, email } }
“errors”: [ { “message”: “error”, “location”: … , “fields”: ...
} ] query { users { id, name, gender } }
how how
server-side bit.ly/2OYP9IS
prisma
data-base layer
None
application layer
None
client-side bit.ly/2zRBNUq
apollo
query
import gql from ‘graphql-tag’ import { Query } from ‘react-apollo’
const GET_USERS = gql` query { users { id, name,
email } }`
<Query query={GET_USERS}> {({ load, error, data }) => { ...
} </Query>
if (load) { return <Load load={load} /> }
if (data.users) { return <List items={data} /> }
if (error) { return <Error error={error} /> }
mutation
import gql from ‘graphql-tag’ import { Mutation } from ‘react-apollo’
const CREATE_USER = gql` mutation { createUser( name: “Felipeson”, email:
“
[email protected]
” ) { id, name, email } }`
<Mutation mutation={CREATE_USER}> {( createUser , { load, error, data })
=> { ... } </Mutation>
<div> ... <UserForm submit={createUser} /> </div>
when?
is difficult to close the API contracts
overfetching underfetching
consume the same endpoint in != ways
consuming != APIs
learn something new!
thanks! @felipesoares6_ felipesoares6 bit.ly/2OYP9IS bit.ly/2zRBNUq client-side server-side