Closed reobin closed 4 months ago
You can use createOrderBy
it like:
const variables: OrderByVariables = {
orderBy: {
collections_items_aggregate: createOrderBy('count', Order.DESC),
},
}
The problem might be that the type OrderByVariables
doesn't support nested objects. I made #114 to address that.
Now after #115 it can be done as:
const variables: OrderByVariables = {
orderBy: createOrderBy('collections_items_aggregate.count', Order.DESC),
}
Is your feature request related to a problem? Please describe.
Hey team! During the implementation of the feature to sort collections by number of drops, I had to use an
orderBy
that looked like this:Unfortunately, I had to remove the use of the
createOrderBy
from the SDK because it only allowed 1 level. ({ key: value }
).Describe the solution you'd like
Allow both nested and not objects as the
orderBy
.