Closed RichardLindhout closed 3 years ago
By as an ENUM with all low level available keys of object
This would support all use-cases in a type-safe way :)
input UserOrdering {
sort: UserSort!
direction: SortDirection! = ASC
}
enum SortDirection { ASC, DESC }
enum UserSort { FIRST_NAME, LAST_NAME }
{
users(orderBy: [{sort: FIRST_NAME}, {sort: LAST_NAME}])
}
Released in v3.0.0
It would be nice to sort on columns maybe even more than 1 if you want it. And would be cool if it was type safe in graphql schema.
sort: { by: [name] type: ASC | DESC }