Why GraphQL Exists and When to Choose It

GraphQL was created by Facebook (Meta) to solve a specific problem at mobile scale: REST APIs returned too much data (over-fetching) or required multiple round-trips (under-fetching). With GraphQL, the client specifies exactly which fields it needs in a single query. This is compelling for mobile apps and complex UIs, but GraphQL introduces its own complexity — particularly around caching, security, and the N+1 problem. Understanding the trade-offs before committing is essential.