Re:Ask HN: Were you happy moving your API from REST to GraphQL?
by andrewstuart2 on Thursday July 19, 2018 @11:39AM
(#17567321)
Who says GraphQL is not RESTful, though?
You have resources represented as a graph and you're asking for the state (in some representation -- probably JSON, but maybe protobuf, etc), just in a more expressive and deeper way than a simple HTTP Get with a single URL can express.
Nothing about REST ever said that a resource locator had to be a URL, or that a single resource can't represent a collection of resources.
That's all GraphQL does, IMO. It lets you more flexibly and expressively ask for stat of a collection of resources.
You have resources represented as a graph and you're asking for the state (in some representation -- probably JSON, but maybe protobuf, etc), just in a more expressive and deeper way than a simple HTTP Get with a single URL can express.
Nothing about REST ever said that a resource locator had to be a URL, or that a single resource can't represent a collection of resources.
That's all GraphQL does, IMO. It lets you more flexibly and expressively ask for stat of a collection of resources.