GraphQL : The Next REST

GraphQL is a open source a data query language provide by facebook written in JS/Node. It’s help us to provides a common interface for data fetching and manipulations. It’s avoid the differences between the data from the client side apps and the server queries they required. It’s no need a graph database, it works just fine with whatever database you have.

GraphQL queries are like JSON objects without properties. It’s important to mention that GraphQL is not language specific, it’s just a specification between the client and the server. Any client should be able to communicate with any server if they speak the common language.

Below is comparation example between GraphQL and REST

Comparison of fetching a list of album’s assets and their comments with REST (left) and GraphQL (right).(image credit form