What is GraphQL?
GraphQL is a query language and runtime for APIs, developed by Facebook (2012, open-sourced 2015).
GraphQL is a query language and runtime for APIs, developed by Facebook (2012, open-sourced 2015). Unlike REST, where the server defines the response structure, GraphQL lets clients specify exactly which fields they need, reducing over-fetching and under-fetching.
Key features: Single endpoint (all queries hit one URL), Client-specified queries (request exactly the data you need), Strong typing (schema defines all types and relationships), Real-time subscriptions (WebSocket-based live updates), and Introspection (API is self-documenting).
Trade-offs: More complex server implementation, caching is harder (no URL-based caching), potential for expensive queries (N+1 problems, unbounded depth), and requires additional security measures (query depth/complexity limiting).
Why It Matters
GraphQL solves the mobile/frontend development problem of needing different data shapes for different views. One GraphQL query replaces multiple REST calls, reducing bandwidth and latency.
Frequently Asked Questions
When should I use GraphQL?
When clients need flexible data shapes (mobile apps, complex UIs), when you're aggregating multiple data sources, or when reducing network requests matters. Don't use for simple CRUD with one client.
Is GraphQL replacing REST?
No. Both coexist. REST is simpler for basic CRUD and has better caching. GraphQL shines for complex data requirements and multiple clients. Many organizations use both for different services.
Related Terms
Need Expert Help?
Richard Ewing is a Product Economist and AI Capital Auditor. He helps companies translate technical complexity into financial clarity.
Book Advisory Call →