Fix GitLab Credits user page during multi-node upgrade

What does this MR do and why?

Closes #638245 (closed)

This MR adds the @gl_introduced(version: "19.6.0") directive to the usedFlowTypes and events fields in the GitLab Credits GraphQL queries.

Context & Problem

During a multi-node upgrade to 19.6, a page served by an upgraded node may query GraphQL from an un-upgraded node. In 19.6, the includeNonBillable argument was added to the usedFlowTypes and events fields. Without the @gl_introduced directive on these fields, an older node rejects the entire query because it does not recognize the includeNonBillable argument, breaking the GitLab Credits user page with:

Field 'usedFlowTypes' doesn't accept argument 'includeNonBillable'
Field 'events' doesn't accept argument 'includeNonBillable'

Changes Made

Tagged both fields with @gl_introduced(version: "19.6.0"):

  1. ee/app/assets/javascripts/usage_quotas/usage_billing/users/show/graphql/get_user_subscription_usage.query.graphql: Added @gl_introduced(version: "19.6.0") to usedFlowTypes(includeNonBillable: true).
  2. ee/app/assets/javascripts/usage_quotas/usage_billing/users/show/graphql/get_user_subscription_usage_events.query.graphql: Added @gl_introduced(version: "19.6.0") to events(..., includeNonBillable: true).

With this directive, older nodes automatically omit these fields during schema validation instead of rejecting the query.

Verification

Jest Test Suite

yarn jest ee/spec/frontend/usage_quotas/usage_billing/
# Result: 10 test suites passed, 165 tests passed (0 failures)

MR Acceptance Checklist

  • Conforms to GitLab GraphQL guidelines
  • @gl_introduced(version: "19.6.0") added to both fields
  • All 10 test suites in ee/spec/frontend/usage_quotas/usage_billing/ pass

Merge request reports

Loading
Loading