Add cdEnvironmentTiers query on Organization
What does this MR do and why?
Add Organization.cdEnvironmentTiers, a GraphQL field returning the list of CdEnvironmentTier enum values available in the organization.
The field always returns the same four tiers, confirmed with Product in https://gitlab.com/groups/gitlab-org/-/work_items/21247#note_3448765760: DEVELOPMENT, QA, STAGING, PRODUCTION.
The environments page uses this to render the tier filter row, group environments by tier in the page sections, and populate the tier dropdown on the register-environment form.
Behind the ai_native_deploy feature flag (default off), authorized by :read_cd_environment on the organization (same path as Organization.cdEnvironments).
Why return the enum directly
!242621 (merged) decided to ship Beta with a fixed set of four tiers stored as a smallint enum column on cd_environments, instead of a separate cd_environment_tiers table. Full user-defined tiers per organization, backed by cd_environment_tiers, are planned post-Beta once Product and UX validate the direction.
This query follows the same approach. For Beta it returns the CdEnvironmentTier enum values directly. The field is marked experiment:, so when cd_environment_tiers lands we can switch the return type to a tier object (with id, name, description, ...) without a deprecation cycle.
References
- https://gitlab.com/groups/gitlab-org/-/work_items/21247#note_3448765760
- https://gitlab.com/gitlab-org/gitlab/-/work_items/602930
- https://gitlab.com/gitlab-org/gitlab/-/work_items/602931
Screenshots or screen recordings
| Scenario | Screenshot |
|---|---|
With ai_native_deploy enabled |
![]() |
With ai_native_deploy disabled |
![]() |
How to set up and validate locally
-
Enable the
ai_native_deployfeature flag. -
Query the tier list and confirm the same tier values are available:
query { organization(id: "gid://gitlab/Organizations::Organization/1") { id cdEnvironmentTiers } } -
Confirm the field is gated:
- Disable
ai_native_deploy→cdEnvironmentTiersreturnsnull. - Query as a non-owner organization member →
cdEnvironmentTiersreturnsnull.
- Disable
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.

