GraphQL
API
Backend
Web Development
Ask anything about this article
Hi! I've read this article.
What would you like to know?
@farhan
REST APIs often suffer from over-fetching (getting too much data) or under-fetching (requiring multiple API calls to get nested data).
GraphQL allows the client to request exactly the data it needs, and nothing more. A single query can retrieve a user, their posts, and the comments on those posts.
GraphQL relies on a strongly-typed schema. This acts as a contract between the frontend and backend teams, enabling them to work independently without fear of breaking changes.