News for hackers. Stuff that matters.
Re:A REST View of GraphQL by tsimionescu on Wednesday July 08, 2020 @09:03AM (#23769451)
I agree with you 100%. In fact, in the REST standard in our company, we have 3 things that help with these problems:

1. All of our responses are well documented, both in separate docs and in a self-documenting format (you can GET .../$docs on any URL to get the description of field)

2. We support an "?includes=" query param that can be used to get arbitrarily deep data with a single GET request

3. Each object contains links to its relations, and these can often be relational-style queries. For example, you can make a request to /users and that would return a list of User objects, with each having a link for a field named "groups", with a link like /groups?userid=0. However, if you want directly the users with all groups, you can request /users?include=groups, and the backend will automatically populate that field as well.

Re:A REST View of GraphQL by cerberusss on Wednesday July 08, 2020 @11:29AM (#23770862)
> you can GET .../$docs on any URL

Wow, that is some next level stuff right there. Very nicely done. What do you get back? JSON, plain text, HTML, man page?

Re:A REST View of GraphQL by tsimionescu on Wednesday July 08, 2020 @01:37PM (#23772184)
JSON, describing the fields of the objects. Honestly it's not very widely used, but it was an easy implementation so we decided to leave it exposed.