

Lesson 01 · 9 min
Why GraphQL
One endpoint, one request, exactly the fields you need.
9 minLesson 1 of 9Practice includedAsk AI on any point
In REST a profile page often makes three requests (/users/1, /users/1/orders, /users/1/friends) and gets lots of fields it never shows. GraphQL has one entry point, /graphql, and the client describes the shape of the data it needs. The server returns JSON in exactly that shape.
- A response always has
dataand maybeerrors, even with status 200. - The schema is a contract: the client sees which fields exist before asking.
- Popular servers: Apollo Server, GraphQL Yoga, Mercurius.
Check
Lock it in before you move on
1. How many endpoints does a GraphQL API usually have?
2. Who decides which fields are in the response?
3. An error in one GraphQL field. Which HTTP status is most common?