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

Screenshots or screen recordings

Scenario Screenshot
With ai_native_deploy enabled Screenshot_2026-06-29_at_10.22.03_am
With ai_native_deploy disabled Screenshot_2026-06-29_at_10.24.53_am

How to set up and validate locally

  1. Enable the ai_native_deploy feature flag.

  2. Query the tier list and confirm the same tier values are available:

    query {
      organization(id: "gid://gitlab/Organizations::Organization/1") {
        id
        cdEnvironmentTiers
      }
    }
  3. Confirm the field is gated:

    • Disable ai_native_deploycdEnvironmentTiers returns null.
    • Query as a non-owner organization member → cdEnvironmentTiers returns null.

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 Agnes Slota

Merge request reports

Loading