Nestjs-query: sorting by one-to-one relation field

202 views Asked by At

With nestjs-query we can filter by nested relations:

{
  todoItems(
    filter: {nested: {completed: {is: true}}},
    sorting: {field: "title", direction: "ASC"},
   ){
    pageInfo{
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    edges{
      node{
        id
        title
        completed
        created
        updated
      }
      cursor
    }
  }
}

Can we do something like that with sorting?

Option lookahead is turned on. I use FilterableRelation. TypeORM.

0

There are 0 answers