Create AiUsageEvents GraphQL aggregation field
Summary
Mount the AiUsageEvents aggregation engine (#589610 (closed)) on the existing AiUsage GraphQL type to expose aggregated GitLab Duo usage analytics via the GraphQL API.
Proposal
Mount the AiUsageEvents aggregation engine using the mount_aggregation_engine helper on the existing AiUsage GraphQL type.
Implementation Details
Location: ee/app/graphql/types/
Example:
module Types
class AiUsageType < BaseObject
mount_aggregation_engine(
::Analytics::AggregationEngines::AiUsageEvents,
field_name: :ai_usage_events_analytics,
description: 'Aggregated AI usage analytics across all GitLab Duo features'
)
end
endDependencies
- Blocked by: #589610 (closed) (AiUsageEvents aggregation engine must be implemented first)
Acceptance Criteria
- Aggregation engine is mounted on AiUsage GraphQL type
- GraphQL field returns aggregated AI usage data
- All metrics from engine are accessible via GraphQL
- GraphQL documentation is auto-generated
- Feature flag
glql_ai_usage_event_analytics_aggregationguards the field
Related
- Epic: &21216 (closed)
- Engine: #589610 (closed)
- Feature flag:
glql_ai_usage_event_analytics_aggregation
Labels
groupoptimize sectionanalytics devopsanalytics ~Category::"Custom Dashboards Foundation" dashboardexploration typefeature featureaddition backend
Edited by 🤖 GitLab Bot 🤖