GraphQL explained
What GraphQL is and how it differs from REST: one endpoint, a typed schema, queries that ask for exactly the fields you need, mutations, resolvers and the N+1 problem, caching trade-offs, and when GraphQL is worth adopting.
CodexBash, , 5 min read
A REST API gives you a fixed response per URL. A mobile screen that needs a user's name, their last three orders and each order's product names might call three endpoints and receive dozens of fields it never shows. GraphQL, created at Facebook and open-sourced in 2015, takes a different approach: one endpoint, a typed schema describing everything available, and queries in which the client asks for exactly the fields it needs, in one request. This article explains how it works and when it is the right choice.
Sign in to read the rest
The whole 5 minute article is free with an account, along with every problem, lesson and tutorial. No card.