- GraphQL can answer to front-end specifying the fields of interest. This improve your performance application.
- GraphQL has only one endpoint to provide its resources, while REST use multiple of them.
- GraphQL provides only the necessary fields required by your front-end request.
GraphQL is a query language. It gives control to the user to query what he needs, thus reducing the payload on the network.
-
Schema (Schema Definition Language SDL)
-
Query (GET in REST)
-
Mutations (POST and PUT in REST)
-
Resolvers (Functions to resolve requests)