Loading
Add daily_usage field to GitlabSubscriptions::User::CreditsUsageType
What does this MR do and why?
This adds daily_usage field to GitlabSubscriptions::User::CreditsUsageType
Users will be able to query their own GitLab Credits daily usage.
Relates to #605986 (closed)
References
- Issue: #605986 (closed)
- CustomersDot counterpart MR: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/17037
- Epic: gitlab-org#22817 (closed)
- UI prototype: https://product-rapidprototype-a1c47d.gitlab.io/self-scoped-credits-usage/
- Feature Planning issue: https://gitlab.com/gitlab-org/gitlab/-/work_items/604722
Screenshots or screen recordings
How to set up and validate locally
- Ensure you're running local GDK in SAAS mode (e.g.
export GITLAB_SIMULATE_SAAS=1 gdk restart) - Make sure you have Customers Dot running with the branch from this MR: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/17037
- Enable
user_gitlab_credits_dashboard - Have your user be part of one or more groups with gitlab credits
- Consume some credits for your user
- Execute this query on GraphQL explorer https://gdk.test:3443/-/graphql-explorer
query getUserCreditsUsage {
currentUser {
creditsUsage(namespacePath: "your-group") {
creditsUsed
dailyUsage {
date
creditsUsed
}
}
}
}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
