Interview questions
Question 230 of 254
FreeWhat is GraphQL, and how does it differ fundamentally from a REST API?
GraphQL with Spring Boot
GraphQL is a query language for APIs where the client specifies exactly which fields it needs in a single request, and the server returns precisely that shape — no more, no less. REST typically exposes many fixed-shape endpoints (`/users/1`, `/users/1/orders`), often forcing a client to either over-fetch (get fields it doesn't need) or under-fetch (need multiple round trips to assemble the full picture it wants) — GraphQL collapses that into one endpoint and one request, with the client driving what specifically comes back.
Intermediate5 min

