Practice this topic in a realistic system design interview
REST APIs are simple and useful, but they can become awkward for some product screens. A mobile app may only need a user's name and avatar, while /users/123 returns 30 fields. Or one screen may need data from three endpoints, turning one user action into several network calls.
GraphQL was created for this kind of problem. It lets the client ask for exactly the data it needs. Instead of the server deciding one fixed response shape for each endpoint, the client sends a query that describes the response shape it wants.
This chapter explains how GraphQL works, how resolvers fetch data, why the N+1 problem happens, and when GraphQL is or is not the right choice.