Easier way to group query results?

I need to group the total number of pull requests merged by day on a specific period of time, is there a way to achieve that directly via an API query call ? Im new to GraphQL, and currently im using an approach where i`ll have to do that in my side.

My current code:

query {
  repository(owner: "microsoft", name: "vscode") {
    detailedInfo: pullRequests(orderBy: {field:CREATED_AT, direction:DESC}, first: 100) {
      edges {
        node {
          id
          state
          updatedAt
          mergedAt
          closedAt
          createdAt
        }
      }
    }
  }
}

No, GraphQL doesn’t provide a way to perform aggregation within the query language itself. The aggregation has to be performed server side and provided as a new data type or field on an existing data type or it has to be done client side.

I hope that helps!