Build the mental model
GraphQL is a query language for APIs, paired with a server-side runtime that executes those queries against your existing data. Unlike REST, where each endpoint returns a fixed shape of data, GraphQL lets the client specify exactly which fields it wants in a single request. That solves both over-fetching (a mobile client getting a full object when it only needs two fields) and under-fetching (needing several round trips to REST endpoints to assemble nested data). GraphQL is not a database itself — it is a layer that sits on top of whatever data sources you already have, such as a SQL database, REST APIs, or microservices.
Connect it to a real scenario
Throughout this course we use a running example called the Tutorial Platform, a blog and course-catalog project. Its REST version returns full author bios and lesson content even when a client only needs a card preview, while the GraphQL version lets that client ask for just title and summary. The roadmap moves from schema and types, through queries and mutations, into intermediate patterns like pagination and the N+1 problem, then Apollo Server and Client, and finally production concerns like auth, federation, and performance.
Try the working example
Client
|
| POST /graphql { query: "{ tutorial(id:1){ title } }" }
v
GraphQL Server (single endpoint)
|
| resolvers route each field
v
Resolvers ---> PostgreSQL (tutorials, authors)
---> REST service (analytics)
---> Cache (Redis)You can explain what problem GraphQL solves and preview this course's project.5-minute try-it
Think of a REST API you know. List three fields a client over-fetched from one response, and one case where it had to call two endpoints to assemble nested data (under-fetching).
One important caution
Do not assume GraphQL is a database, or that it is automatically faster than REST. The underlying data sources (SQL queries, network calls) do not change — a naive resolver can end up slower than REST.
GraphQL — Introduction to GraphQL — GraphQL