589652 - Aggregation framework orderBy to support parameterized dimensions
What does this MR do and why?
This MR adds support for ordering by parameterized dimensions in the aggregation framework's GraphQL API
The aggregation framework's orderBy argument did not support parameterized dimensions (such as date_bucket dimensions). When users attempted to sort by a parameterized dimension like eventDate(granularity: "daily"), they encountered the error:
"message": "the specified identifier is not available: 'eventDate'"
Encountered when working on ai usage events aggregation engine MR: !222948
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
Run this query locally on this MR branch
query {
group(fullPath: "my-group") {
aiUsage {
events(
feature: "code_suggestions"
dateFrom: "2026-01-01"
dateTo: "2026-02-28"
orderBy: [{
identifier: "eventDate",
parameters: {granularity: "daily"},
direction: DESC
}]
) {
nodes {
dimensions {
eventDate(granularity: "daily")
feature
}
totalCount
}
}
}
}
}
references #589652 (closed)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Amr Taha