I work with pedagogies, teach, write curricula, coach, manage, mentor, consult, speak publicly, polemicize, and sometimes work as a full-stack web developer, architect, ontologist, and more.
Nesting is one thing, but for limiting the columns/keys returned, it's simply a matter of passing a query string (for GETS) or a list in the headers (for POST/PUT/PATCH). All REST interfaces should be designed this way. There is no point passing back what isn't required.
You can use query strings to indicate joins, selects from nested elements, etc., too, but this might be past the point of diminishing returns -- and would start to resemble putting GraphQL in the query string. What would be the point?
So which is better depends on your data model, really.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nesting is one thing, but for limiting the columns/keys returned, it's simply a matter of passing a query string (for GETS) or a list in the headers (for POST/PUT/PATCH). All REST interfaces should be designed this way. There is no point passing back what isn't required.
You can use query strings to indicate joins, selects from nested elements, etc., too, but this might be past the point of diminishing returns -- and would start to resemble putting GraphQL in the query string. What would be the point?
So which is better depends on your data model, really.