GraphQL
Definition
A query language and runtime for APIs developed by Facebook that allows clients to request exactly the data they need, reducing over-fetching and under-fetching common with REST APIs.
GraphQL is a specification for building APIs that provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need, and makes it easier to evolve APIs over time. Unlike REST APIs where each endpoint returns a fixed data structure, GraphQL uses a single endpoint where clients specify their data requirements through queries.
A GraphQL schema defines the types of data available and the relationships between them using a strongly-typed system. Clients send queries that mirror the shape of the desired response, requesting only the specific fields needed. This eliminates over-fetching, where REST endpoints return more data than needed, and under-fetching, where multiple REST calls are required to assemble the necessary data.
GraphQL has been adopted by major companies including GitHub, Shopify, Twitter, and Airbnb. Its benefits include reduced network traffic, better developer experience with built-in documentation and type checking, and easier API evolution since new fields can be added without versioning. However, GraphQL introduces complexity in areas like caching, rate limiting, and query optimization, and may be overkill for simple APIs with straightforward data requirements.
No spam. Unsubscribe anytime.
Related Calculators
Related Terms
REST API
techAn architectural style for web services that uses standard HTTP methods to create, read, update, and delete resources, providing a stateless communication interface.
API (Application Programming Interface)
techA set of rules and protocols that allows different software applications to communicate with each other and share data or functionality.
JSON (JavaScript Object Notation)
techA lightweight data interchange format that is easy for humans to read and write and easy for machines to parse and generate.
HTTP (HyperText Transfer Protocol)
techThe foundational protocol for data communication on the web, defining how messages are formatted and transmitted between clients and servers.
Related Articles
JSON Formatting Best Practices: Write Clean, Valid JSON
Master JSON formatting with best practices for syntax, nesting, and validation. Learn common errors, debugging tips, and how to write clean JSON data.
Regex Cheat Sheet: Essential Patterns Every Developer Needs
A practical regex reference guide with common patterns for emails, URLs, phone numbers, and more. Includes syntax explanations and real-world examples.
How to Generate Secure Passwords: Best Practices for 2026
Learn how to create strong, secure passwords that protect your accounts. Covers password length, complexity, managers, and multi-factor authentication.
Guide to QR Codes: How They Work, Types & Best Uses
Learn how QR codes work, the different types available, and best practices for creating and using them in marketing, payments, and information sharing.