2 ms·
One of the problems backend systems sometimes have is presenting similar data in slightly different ways for use in many different places. One of the solutions
by strken 5y ago
One of the problems backend systems sometimes have is presenting similar data in slightly different ways for use in many different places. One of the solutions to this is GraphQL, which lets you break your data loading into reusable pieces (resolvers) and define endpoints based on those reusable pieces (queries).
You could "just" do this yourself, of course. GraphQL is nice because it gives you a sensible starting point and a lot of free tooling. You get Graphiql to help you quickly write new queries, you get well-defined schemas between server and client, you get linters for queries, you get GraphQL itself to glue your resolvers together and interpret your queries.
If your system has a grand total of 20 API endpoints and they're nearly all unique, you don't need GraphQL.