News for hackers. Stuff that matters.
Re:REST vs. GraphQL – A search for evidence on which is better by charrondev on Tuesday December 15, 2020 @08:41PM (#25438008)
At work almost every endpoint supports an “expand” parameter that will do various expansions of referenced resources in the returned records. This can:

- cause additional sql joins - or pull individual records from a cache (if it’s a small enough dataset) - or cause one additional DB query and save a network round trip.

Example:

/api/v2/discussions?sort=recent&expand=insertUser,updateUser,lastCommentUser,parentCategory

This would be a pretty extensive case but is very useful.

There are no comments on this comment yet.