subql
subql copied to clipboard
orderBy with SUM return a wrong order if the type is BigInt.
https://explorer.subquery.network/subquery/subquery/subquery-mainnet
{
projects(orderBy: DEPLOYMENT_BOOSTER_SUMMARIES_SUM_TOTAL_AMOUNT_DESC) {
nodes {
id
deploymentBoosterSummaries {
aggregates {
sum {
totalAmount
}
}
}
}
}
}
It compare with string rule:
'800' > '7000'
The type of totalAmount is BitInt in schema.
This is a known bug without a concrete solution. https://github.com/subquery/subql/pull/2703