News for hackers. Stuff that matters.
Re:REST vs. GraphQL – A search for evidence on which is better by valenterry on Wednesday December 16, 2020 @02:27AM (#25439976)
The GraphQL equivalent to creating a new, specialized REST route would be to create a new, specialized query.

E.g. the following REST

    /articles-with-comments?number=20
which returns title, contents etc. would map to a completely new query in graphql

    articlesWithComments(number: Integer) {
      title
      contents
      ...
    }
so it is exactly as easy to optimize. Of course this is not very composable, but that is equally true for both solutions.
Re:REST vs. GraphQL – A search for evidence on which is better by gabereiser on Wednesday December 16, 2020 @12:55PM (#25445783)
and this is the pattern we see in the wild mostly.