GraphQL
Lucas Martins - @lucasgmartins
medium.com/lucasgmartins
case
You're
responsible by
design a new
netflix api
for browser,
mobile and tv
Movie Entity
type Movie {
name: String!
title: String!
year: Int!
director: String
writer: String
actors: String
languages: String
ratings: Float
released: Date
genres: String
poster: String!
imdb_id: String!
downloadable: Boolean!
}
/movies
type Movie {
name: String!
year: Int!
director: String
writer: String
actors: String
languages: String
ratings: Float
genres: String
poster: String!
downloadable: Boolean!
}
browser
type Movie {
name: String!
year: Int!
ratings: Float
genres: String
poster: String!
downloadable: Boolean!
}
mobile
/movies/mobile
type Movie {
name: String!
year: Int!
actors: String
ratings: Float
genres: String
poster: String!
}
tv
/movies/tv
/movies
/movies/mobile
/movies/tv
new requirement;
some mobile
doesn't accept
poster at screen
type Movie {
name: String!
year: Int!
ratings: Float
genres: String
poster: String! (?)
downloadable: Boolean!
}
tv
/movies/mobile
?d=[SAMSUNG,
APPLE]
N API
N responses
Created by facebook in
2012 and released in 2015
data query and
manipulation
language for APIs
+ +
LIVEDEMO
https://github.com/lucasgmartins/graphql-demo
GraphQL
Articles
https://medium.com/paypal-engineer
ing/graphql-a-success-story-for-payp
al-checkout-3482f724fb53
https://blog.apollographql.com/grap
hql-at-facebook-by-dan-schafer-38d6
5ef075af
Thanks
Lucas Martins - @lucasgmartins
medium.com/lucasgmartins

Introducing GraphQL