subql icon indicating copy to clipboard operation
subql copied to clipboard

[Feature Request] Support sort on groupedAggregates.

Open HuberTRoy opened this issue 1 year ago • 0 comments

Prerequisites

  • [x] Are you running the latest version(s)?
  • [x] Have you searched the documentation for your issue?
  • [x] Did you search for an existing issue or pull request?

Description

https://explorer.subquery.network/subquery/subquery/subquery-mainnet

{
  eraRewards(orderBy: ERA_IDX_DESC) {
    groupedAggregates(groupBy: ERA_IDX) {
      keys
      sum {
        amount
      }
    }
  }
}

The result is

eraRewards {
    groupedAggregates [{
       keys: ["2"] 
   }, { keys: ["3"] } ...]
}

Expect:

eraRewards {
    groupedAggregates [{
       keys: ["3"] 
   }, { keys: ["2"] } ...]
}

HuberTRoy avatar Nov 22 '24 01:11 HuberTRoy