What is GraphQL?

A flexible alternative to REST

GraphQL is a query language and runtime for APIs that allows clients to request exactly the data they need—nothing more, nothing less.

Instead of multiple REST endpoints, GraphQL exposes a single endpoint where clients specify the structure of the response in a query. The server then returns data that matches that structure.

Key benefits include:

  • Efficiency: Reduces over-fetching and under-fetching of data.
  • Flexibility: Clients control the shape of the response.
  • Strong typing: Uses a schema to define data types and relationships clearly.

It was developed by Facebook in 2012 and released publicly in 2015, and it’s widely used for building modern web and mobile APIs.

Sources

https://graphql.org/learn/