Hacker News new | ask | show | jobs
by xrd 2887 days ago
I'm really curious to hear from people dealing with massive JSON (or XML) responses via REST. This is where REST really falls apart with complexity that is much worse than trying to learn the complexity of GraphQL.

See: https://brandur.org/graphql

"In GraphQL, every contract is explicit and observable. Providers can use something like a canonical log line to get perfect insight into the fields that are in use for every request, and use that information to make decisions around product development, API changes, and retirement."

You simply cannot know with a REST API what to remove if the decisions on what to return for a request are largely made by the server side team. So, you end up with massive, clunky and confusing responses. GraphQL forces the client side users to understand how to use it, and because of that you get so much more.