Add licensedFeatureAvailability GraphQL field to Project, Namespace, and Group
What does this MR do and why?
Adds a new licensedFeatureAvailability GraphQL field to Project, Namespace, and Group types, returning whether a given licensed feature is available and the minimum plan required if not. This provides the backend API needed for Duo agentic chat to surface clear tier-gating messages to users.
Related to https://gitlab.com/gitlab-org/gitlab/-/work_items/588337.
Related AI Gateway MR: gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!5089 (merged).
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Start GDK with an EE license enabled.
- Test on a project:
query {
project(fullPath: "gitlab-org/gitlab-shell") {
licensedFeatureAvailability(feature: SECURITY_DASHBOARD) {
available
requiredPlan
}
}
}- Test on a group:
query {
group(fullPath: "gitlab-org") {
licensedFeatureAvailability(feature: EPICS) {
available
requiredPlan
}
}
}- Both queries should return
available: trueandrequiredPlan: nullwhen the feature is licensed. On a free-tier namespace, expectavailable: falsewith the minimum required plan (e.g.,"premium"or"ultimate").
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.