Right now most queries are
table(filter: {}, paging : { limit : x, skip : x })
Do we rename paging
to options
, and put sort
inside?
users(filter: {}, options: { limit : x, skip : x, sort : x })
Do we keep paging
and make sort
a sibling
users(filter: {}, paging : {}, sort : [{ field : "x", order : "asc" }]
Then, what is the shape of the sort key. Do we explicitly expose available sorts. This allows us to tightly control what sorts are exposed ensuring that they can be performant.
enum auth_roles_sort {
title_desc
}
sort : title_desc
Or do we allow arbitrary sorts, more powerful, won't require core to add more sort capabilities, but can be less performant over time, since we can't guarantee which sorts are being utilized.
sort : [{ field : "title", dir : "asc" }]
Or some combination in between?