News for hackers. Stuff that matters.
Re:Best practices for REST API design (2020) by simiones on Monday February 22, 2021 @03:22PM (#26230039)
It depends on performance requirements. Either ask them to retrieve the entire objects, or expose a new endpoint to retrieve the filtered list in an optimal way.

API consumers definitely aren't the ones who should be thinking about something like joining behavior, since GraphQL doesn't give nearly enough control to achieve performant joining.

Basic filtering can also be easily achieved with ad-hoc methods, such as query params. No need for a full-blown GraphQL language server in front of all your services.

Re:Best practices for REST API design (2020) by mikewhy on Monday February 22, 2021 @03:49PM (#26230403)
No need for it, from your perspective, sure. It totally solves a lot of shortcomings your API is forcing on its consumers though.
Re:Best practices for REST API design (2020) by simiones on Tuesday February 23, 2021 @07:14AM (#26236403)
In general, my consumers don't want to learn my API. If they find shortcomings, they don't want to work around them by learning to query my bad models, they will call and complain that my model is bad and that I have to fix it in the next version or they'll look elsewhere.

At least, this has been our experience with B2B software sales.

Of course, YMMV depending on market etc.