Skip to main content
G
g
Glossary Term

GraphQL

GraphQL is an open-source query language for application programming interfaces (APIs).

By IT Brew Staff

less than 3 min read

Back to Glossary

Definition:

GraphQL specifies clearly how a client application can request data from a server via APIs. It is HTTP-based and relies on a client-server model, with a single client requesting that data from a single server.

GraphQL bears many similarities to REST (representational state transfer), an architectural style that allows client applications to effectively interact with servers via REST APIs. For example, both are stateless and HTTP-based; however, REST APIs always return a whole dataset, which is often more data than an application actually needs, which can impact system performance and the amount of code that development teams need to write. GraphQL is designed to receive only the data needed in response to a query.

GraphQL and REST also differ in their versioning, caching, and error handling; GraphQL supports real-time updates, while REST does not. Each has different uses; for example, an organization using smaller apps and relatively few complex data queries might opt to use REST for its stringent access controls and well-established protocols, while another might choose GraphQL if it wants to limit calls and responses due to restricted bandwidth.

GraphQL was developed in the early 2010s by Facebook engineers who needed a more streamlined way to fetch data for increasingly complex social media applications, then publicly released as open-source software. Its development is now overseen by the nonprofit GraphQL Foundation, which is hosted by the Linux Foundation.