Founder of CasaVersa
Yariv Gilad
@__Ajar__
Head of Dev
Netcraft Academy
Founding Team
Wibbitz
/data-endpoint/
my-domain.com/api
/user/ { id }
my-domain.com/api
/user/ { id } /tweets
/user/ { id } /notifications
/tweet/ { id }
/tweet/ { id } /media
/tweet/ { id } /stats
/user/ { id }
/user/ { id } /notifications
/tweet/ { id }
/tweet/ { id } /media
/tweet/ { id } /stats
client / s
api server
/user/ { id } /tweets
{ data... }
api server
client / s
api server
client / s
/resource/ { id }
api server
client / s
/just-tweet-data-i-need
/tweet-data-with-images
/tweet-data-with-images-and-author
/tweet-data-with-images-no-stats
/tweet-data-with-images-and-author_v2
api server
client / s
/user/ { id }
GET
/user/ { id } /update
/user/create
/tweet/ { id }
/tweet/ { id } /update
/tweet/ { id } /create
PUT
POST
/user/remove
DELETE
GET
PUT
POST
DELETE
/tweet/ { id } /delete
api server
client / s
type Project {
name: String
tagline: String
contributors: [User]
}
{
project(name: "GraphQL") {
tagline
}
}
{
"project": {
"tagline": "A query language for APIs"
}
}
{
Starship(name: "Millennium Falcon") {
name
hyperdriveRating
pilots(orderBy: height_DESC) {
name
height
homeworld {
name
}
}
}
}
{
"data": {
"Starship": {
"name": "Millennium Falcon",
"hyperdriveRating": 0.5,
"pilots": [
{
"name": "Chewbacca",
"height": 228,
"homeworld": {
"name": "Kashyyyk"
}
},
{
"name": "Han Solo",
"height": 180,
"homeworld": {
"name": "Corellia"
}
},
{
"name": "Rey",
"height": null,
"homeworld": null
}
]
}
}
}
Single end-point
Single round-trip
Only fetch what you need
Designed for low latency.
view-centric
client-specified queries
integrates with any current infrastructure.
Defines what we want, not how we get it
Always backwards compatible.
Enables API evolution without versions
Strongly typed via a hierarchical schema
Allowing query validation & nested queries
Predictable output.