2 ms·
As with so many discussions around GraphQL vs REST, this is a category error. Quoting Roy Fielding[1]: > REST APIs must be hypertext-driven > I am getting fr
by recursivedoubts 5y ago
As with so many discussions around GraphQL vs REST, this is a category error.
Quoting Roy Fielding[1]:
> REST APIs must be hypertext-driven
> I am getting frustrated by the number of people calling any HTTP-based interface a REST API. Today’s example is the SocialSite REST API. That is RPC. It screams RPC. There is so much coupling on display that it should be given an X rating.
> What needs to be done to make the REST architectural style clear on the notion that hypertext is a constraint? In other words, if the engine of application state (and hence the API) is not being driven by hypertext, then it cannot be RESTful and cannot be a REST API. Period. Is there some broken manual somewhere that needs to be fixed?
There are certainly issues with GraphQL, not the least of which is security. (Facebook, I am told, generates a whitelist of allowed queries at build time. Do you?) But this article is discussing two different RPC implementations that have nothing to do with REST, properly understood.
That being said, I agree entirely that people should consider REST-ful system architectures, but within the context of hypermedia, rather than in term of JSON RPC.
[1] - https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypert...