GraphQL, a query language for APIs and a server-side runtime for executing those queries, has become one of the most popular ways for web applications to fetch data. The “QL” part has led to direct comparisons to SQL (in an excellent introduction to GraphQL for The New Stack, Fikayo Adepoju wrote that it’s “like SQL, but for the front end”).

The fundamental insight that led a team at Facebook to create GraphQL in 2012 and release it publicly in 2015, was that data for modern web applications increasingly require a graph structure for optimization — particularly in mobile apps.

The biggest difference with REST is that just one trip to the server is needed in GraphQL, which makes the data fetch faster.

This specificity in GraphQL is possible because of the schema, a kind of contract between the server and the client that defines the data types.

Related Articles