Best approach for sorting by relationship count

It’s very annoying that people raise a question/issue but then never respond to anyone else posting comments on it; my guess is that they did not find a solution.

I have trying to figure out how I can order by relationship count via the REST API, seems there is no way to do this. I am now looking at customising the controllers/services to achieve this, once again though, seems like it’s impossible to do this.

It seems very odd that something as simple as ordering by relationship counts or selecting relationship counts as a field is not possible with Strapi, it’s one of the most basic and very commonly used things.

Has anyone found a solution to this yet, or is it currently impossible with Strapi?

1 Like