4 ms·
The major problem with GraphQL is that it tries to replace REST, instead of augmenting it. REST is a damned fine model, and arguably what every web API should u
by eadmund 4y ago
The major problem with GraphQL is that it tries to replace REST, instead of augmenting it. REST is a damned fine model, and arguably what every web API should use.
I guess it wouldn't have been as much fun to augment REST with query language than to invent a new one.
- mikewhy 4y agoYou can easily augment a rest API with graphql.
- Kaze404 4y agoHow does GraphQL try to replace REST? You can very easily have a graphql endpoint working in a REST API.
- eadmund 4y ago> You can very easily have a graphql endpoint working in a REST API. The fact that it is an additional endpoint with non-REST semantics is what makes it a replacement rather than an augmentation of REST. In a REST API, endpoints correlate with resources; the resources are queried and updated with HTTP verbs acting on those endpoints. GraphQL introduces a parallel world. What should have been done instead, IMHO, was to design a standard (not necessarily limited to JSON!) way to query and update resources through their endpoints.
- Kaze404 4y agoI don't understand how that makes it a replacement. Breaking conventions of REST for one endpoint doesn't necessarily mean you're replacing it, unless you're using REST as a dogma rather than a tool.