#Sort by value inside Relationship
10 messages · Page 1 of 1 (latest)
Check this thread 🧵 https://discord.com/channels/967097582721572934/1050045542664773653
I understand that the thread is about filter query, but in this situation I want to sort instead. I've tried the dot notation and it doesn't work.
Oh sorry I see, sort. I do not believe that is possible atm
Very interesting, @silent mural you could also just have a field directly within your doc that copies over the data you want to sort. (Copy the data to the top-level)
@tacit mist do you think that would do the job?
I think, it would work by applying the beforeChange hook to copy the data from the relationship to the top-level field, but it will lose dynamic of the content in the relationship.
You could make the server sort with an after read hook, if you set and check for a query param, then sort with js. But obviously that is a workaround