GraphQL is a query language and runtime for APIs that lets a client ask for exactly the fields it needs, across related data, in a single request to one endpoint.

Definition
GraphQL is a way of designing and calling APIs. Instead of many URLs that each return a fixed shape of data, a GraphQL API exposes one endpoint and a typed schema describing everything a client can ask for. The client sends a query that names the exact fields and relationships it wants, and the server returns JSON in that same shape, with nothing more and nothing less.
It was developed at Facebook to serve mobile apps that needed varied data on slow networks, and it was later open sourced and is now maintained under an independent foundation. Today it is used by many web and mobile teams, especially where several clients need different views of the same data, or where a front end needs to combine information from many backend services.

How it works
Everything starts with the schema, written in GraphQL’s schema definition language. It declares types, such as User, Order and Product, their fields and how they relate, along with the entry points clients can use: queries for reading, mutations for writing and subscriptions for real-time updates. The schema acts as a contract that both frontend and backend teams can rely on, and tools can generate documentation and typed client code from it.
A client sends a query to the single endpoint, usually as an HTTP POST. For example, it might ask for a user’s name plus the totals and dates of their last five orders. The server validates the query against the schema, then runs resolvers, small functions attached to each field that know how to fetch that piece of data from a database, a REST service or another API. The results are assembled into a response matching the query’s shape.
Because one query can touch many resolvers, servers commonly batch and cache data lookups to avoid repeating the same database call. Production GraphQL APIs also add limits on query depth and complexity, persisted queries that only allow known operations, and field-level authorization, since a single flexible endpoint needs more care than a fixed set of REST routes.
Keep learning
Put it into practice
Well-designed APIs and dependable third-party integrations that connect your products, partners and internal systems.
Explore serviceFast, secure and accessible web applications built with React and Next.js, designed for real users and real traffic.
Explore serviceMulti-tenant SaaS products engineered for onboarding, billing, security and growth, from MVP to scale.
Explore serviceFAQ
No. GraphQL is a query language for APIs and a server runtime that executes those queries. The data behind it can live in any database, in REST services or in other APIs. Resolvers decide where each field comes from, so GraphQL sits in front of your data rather than storing it.
Not necessarily. Many organizations use both: REST for simple public APIs, file uploads and webhooks, and GraphQL for front ends that need flexible queries across lots of related data. GraphQL resolvers often call existing REST services behind the scenes.
GraphQL is language independent. Mature server and client libraries exist for JavaScript and TypeScript, Python, Java, Kotlin, C#, Go, Ruby, PHP, Swift and others, so teams can usually add it to their existing stack without changing languages.
Talk to a solution architect about where it fits in your roadmap.
