News for hackers. Stuff that matters.
Re:REST and GraphQL really aren't that different by nmadden on Wednesday January 30, 2019 @02:51PM (#19038684)
Really? It’s called GraphQL and its schema can’t describe a simple tree?
Re:REST and GraphQL really aren't that different by Twisol on Wednesday January 30, 2019 @03:02PM (#19038815)
The schema certainly can, but GraphQL queries have the valuable (in many but not all contexts) property that the response structure mirrors the request structure. If your request is nested no deeper than four scopes, then the response will also be nested no deeper than four scopes.
Re:REST and GraphQL really aren't that different by napoleond on Wednesday January 30, 2019 @03:03PM (#19038819)
A GraphQL schema can easily define a tree but AFAIK the client must specify the desired recursion depth on that tree. This kind-of makes sense for the same reason that paginating list resources makes sense, but I can see how it would be annoying.