Sort by nested fields

is sorting / filtering by nested fields possible?

use case
table in UI, which is based on multiple DB collections,
needs to support sorting by every single field

for example
if the table queries Users as such

  users {
    name
    pets { kind }
  }

I need to sort the results, by the kind of pet,
is it possible?

1 Like

I have same question ?
Is any solution exist ?

I’m seeking the same solution that edits the apollo client query, but adding a ‘sort’ argument after a nested table just returns an error (ie ‘sort argument not recognized’). The only fix that I have is to edit the gorm class in the mapping object of the parent table, so that the child tables all indicate ‘sort’, e.g.:

static mapping = {
  table name: 'parent_table'
  name column: 'name'
  childTable sort: 'id'
}