GraphQL

What is GraphQL

  1. A Query language for your application
  2. A server-side runtime handling the queries

A better way to communicate between client and server GraphQL can be seen as a layer between the client and server that handles queries between them using a certain format. GraphQL does not care how or if the server persists data. The name derives Graph from graph theory and QL stands for query language.

Why GraphQL

With GraphQL you can typically create faster and more flexible APIs giving clients the option to ask for just the data they need.

More flexible data querying:

Compared to REST

Mutations are queries that change data. GraphQL queries are more restricted by default than SQL queries. You have to explicitly expose what users can do.

GraphQL doesn't specify what format a server response should use. Could be JSON, XML, YAML etc.