Add credits_used field to subscriptionUsage

What does this MR do and why?

This adds the credits_used field to subscriptionUsage as part of https://gitlab.com/gitlab-org/gitlab/-/work_items/594756

Clients can now query for the total GitLab Credits used in their subscription.

This MR is dependent on https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/15277+

References

Screenshots or screen recordings

Screenshot_2026-04-01_at_14.28.18

How to set up and validate locally

  1. Add some transactions to your subscription's wallet (docs)
  2. Open GraphQL and execute this query (https://gdk.test:3443/-/graphql-explorer) :

Query:

query getSubscriptionUsage($namespacePath: ID) {
  subscriptionUsage(namespacePath: $namespacePath) {
    creditsUsed
  }
}

Variables:

{
  "namespacePath": "your-group"
}

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 Sheldon Led

Merge request reports

Loading
Loading