11. GraphQL is NOT
only for React
Developers
● Facebook started using
GraphQL in 2012 in their native
mobile apps
● It can be used with any
programming languages and
framework
11
Everywhere where client communicates with API!
12. REST
● Increased mobile
usage creates need
for efficient data
loading
● Variety of different
frontend
frameworks and
platforms
● Fast development
expectation for
rapid feature
development
12
?REST has been a popular way to expose data from a server
28. “GraphQL queries can traverse related objects and their
fields, letting clients fetch lots of related data in one
request, instead of making several roundtrips as one would
need in a classic REST architecture.
28
29. 29
● Access control must be moved to resolver
or data layer (no more middleware)
29
Challenges
● Free data traversing of types and
relationships adds more complexity to
access control and data fetching
● Request and response must be multiplex
(query batching)
query {
payments(status: paid) {
id
status
}
subscribers {
id
firstName
lastName
subscribed_at
}
}
{
data: {
payments: [{
id: ...,
status: paid,
}],
subscribers: [{
id: ...,
firstName: James,
lastName: Porlante,
subscribed_at: ...,
}]
}
}
39. Patterns
39
● Root resolvers
● Type Field resolvers
● Context injection
● Apollo Resolvers
● GraphQL Middleware
● Schema directives
● Database / Backend as a service
A
B
S
T
R
A
C
T
I
O
N
Personal flavour
and opinion
Legacy APIs
Project size
Complexity
Apply depending on
Use case
47. Credits (Slidetheme)
Special thanks to all the people who made and
released these awesome resources for free:
● Presentation template by SlidesCarnival
● Photographs by Unsplash
47