Section: IT & Technology · Software DevelopmentDifficulty: Medium
GraphQL
USUK
A query language for APIs that allows clients to request exactly the data they need.
Definition
GraphQL is a query language for APIs and a runtime for executing those queries, developed by Facebook. Unlike REST, which exposes multiple fixed-format endpoints, GraphQL exposes a single endpoint where clients specify exactly what data they need in a hierarchical query. This eliminates over-fetching (receiving more data than needed) and under-fetching (requiring multiple requests). GraphQL uses a strongly typed schema that serves as a contract between client and server, enabling powerful developer tooling.
Example
“Instead of multiple REST calls, a mobile app makes one GraphQL query requesting only user name, profile picture, and the last 3 posts — nothing more.”
Synonyms
- query API
- typed API
- graph query language
Antonyms / Opposites
- REST API
- fixed endpoints
Images
CC-licensed · free to useLoading images…
Video
Related Terms
- rest
- api
- json
- schema
