Aggregation framework orderBy doesn't support parameterized dimensions
Problem
The aggregation framework's GraphQL orderBy argument cannot sort by parameterized dimensions (e.g., date_bucket dimensions with granularity parameters).
Attempting to order by a parameterized dimension results in:
"message": "the specified identifier is not available: 'eventDate'"
Example
This query fails:
orderBy: [{identifier: "eventDate", direction: DESC}]
When eventDate is defined as:
date_bucket :event_date, :date, -> { sql('date') },
parameters: { granularity: { type: :string, in: %w[daily weekly monthly] } }
Root Cause
-
AggregationOrderinput type lacks aparametersfield - Order configuration matching doesn't handle parameter normalization (case conversion and hash key types)
Solution
Resolved in !223108 (closed)
Edited by 🤖 GitLab Bot 🤖