News for hackers. Stuff that matters.
Re:REST vs. GraphQL – A search for evidence on which is better by chris_st on Tuesday December 15, 2020 @12:47PM (#25432731)
This is definitely my experience, particularly in using Hasura (particularly via the wonderful NHost[0], a fantastic database service). I believe that Hasura knows how to not do N+1 queries.

[0] https://nhost.io

Re:REST vs. GraphQL – A search for evidence on which is better by 5Qn8mNbc2FNCiVV on Tuesday December 15, 2020 @06:23PM (#25436798)
Try looking at the generated sql. Afaik it's (almost) always a single sql query being ran
Re:REST vs. GraphQL – A search for evidence on which is better by yen223 on Tuesday December 15, 2020 @08:15PM (#25437814)
Hasura generates one SQL query per top-level field. Hasura takes advantage of Postgres's JSON features to compile a deeply-nested graphql query into a single query.

It's pretty impressive too. For any deeply-nested query, like fetching the 1-to-many children of 1-to-many children of some entity, a lot of ORMs will often have to resort to doing N+1 queries, which adds a surprising amount of latency to a request.