Re:Best practices for REST API design (2020)
by criddell on Monday February 22, 2021 @05:27PM
(#26231528)
> With GraphQL it involves writing one (or two) straightforward queries, while with REST it would require more thought or code.
Aren't you just pushing the work to the back end? The GraphQL resolver is a new layer of complexity while with REST is more straightforward.
A pretty common use-case I have is needing to support these three things :
- A “big object” list screen (where retrieving the whole objects would make the query return megabytes off data)
- A “big object” details screen (where I need the full object)
- Programmatically getting many big objects
With GraphQL it involves writing one (or two) straightforward queries, while with REST it would require more thought or code.