Add paidTierTrial to subscriptionUsage GraphQL API
What does this MR do and why?
Related to https://gitlab.com/gitlab-org/customers-gitlab-com/-/work_items/15815
This MR exposes the paid tier trial state from CustomersDot to support the UI showing a banner with link to CustomersDot.
This adds a new PaidTierTrialType GraphQL type with an isActive boolean field to the subscriptionUsage schema. The field delegates to CustomersDot and maps paidTierTrial.isActive from the metadata response.
Changes:
- Extend CDOT metadata query to request
paidTierTrial { isActive } - Add
PaidTierTrialTypeGraphQL type withisActivefield - Add
paid_tier_trialmethod toSubscriptionUsagemodel - Update
SubscriptionUsageTypeto includepaid_tier_trialfield
References
https://gitlab.com/gitlab-org/customers-gitlab-com/-/work_items/15815+
Screenshots or screen recordings
How to set up and validate locally
-
Login to your GDK at http://localhost:3000
-
Pick a group you want to test with and note the namespace path
-
Enter the query as shown below:
query getSubscriptionUsage($namespacePath: ID) { subscriptionUsage(namespacePath: $namespacePath) { startDate endDate paidTierTrial { isActive } } }With variables:
{ "namespacePath": "clickhouse" } -
The response should contain the new
paidTierTrial.isActivefield.
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.
