REST exposes multiple resource endpoints and returns fixed response shapes, which can lead to over/under‑fetching. GraphQL exposes a single endpoint with a query language so the client asks for exactly the fields it needs, enabling nested fetches but adding schema/resolver complexity and different caching patterns.
Expanding on the short answer — what usually matters in practice:
A tiny example (an explanation template):
// Example: discuss trade-offs for "rest-vs-graphql?"
function explain() {
// Start from the core idea:
// REST: Standard HTTP methods, fixed endpoints. GraphQL: Single endpoint, client requests ex
}