Hacker News new | ask | show | jobs
by anieuwland 7 days ago
> REST allows you to specify which fields you want so you can drop what's not needed over the wire.

How? GET doesn't formally allow you to specify what to fetch, QUERY isn't a thing yet, and building an end point for each unique use case doesn't scale well and results in a complicated API.

1 comments

It does through query parameters. There are different implementations where you pass ?fields= , or there's also OData implementations. I don't think it's too much code to implement it.
This can be a good approach, but I’ve also seen REST APIs become a shittier ad-hoc version of GraphQL.