Why GraphQL ?
Static
Static
Multiplication of endpoints
Multiplication of requests
Static
No typing
Versionning
Documentation
Multiplication of endpoints
Multiplication of requests
Developed and used by Facebook since 2012
Open-source since 2016
Is becoming a new web standard
1 unique endpoint
1 request
- fields
or
- operation to do
http://myapi/graphql
{
todos {
description,
isDone
}
}
Body
dynamic API
an unique request for
all the data you want
REST | GraphQL |
---|---|
|
|
1. We define the endpoints we want
2. We write the code for each endpoint
1. We build the graph structure by adding models or mutations
2. We write the code for each model
Automatic documentation
Strong typing
Simplified versionning
Live testing GraphiQL
Build the following page
Alias, Arguments
Give a star to GraphQl repository
GraphQL is a specification
You can implement it in any language
Implementation for NodeJS, Java, PHP, Python...
And a community behind is already here
1) Build Schema
Classic method
1) Build Schema
2) Add logic
Classic method
1) Build Schema
2) Add logic
3) Link everything
Classic method
Save time
Improve performance
Innovate