Introduce SubscriptionFutureEntry GraphQL types
What does this MR do and why?
Part of #338657 (closed)
Introduce GraphQL types and Resolvers for the future subscriptions, which mimic the existing license types. The queries are not used yet but will be needed for frontend related work.
Note: The first commit is just a refactoring of removing now unused logic.
How to set up and validate locally
- Open Rails console, insert the following into application settings:
a = ApplicationSetting.current a.future_subscriptions = [{ 'cloud_license_enabled' => true, 'plan' => 'ultimate', 'name' => 'User Example', 'email' => 'user@example.com', 'company' => 'Example Inc.', 'starts_at' => '2021-12-08', 'expires_at' => '2022-12-08', 'users_in_license_count' => 25 }] a.save!
- Log in as admin
- Navigate to
http://localhost:3000/-/graphql-explorer
- Query the future subscriptions with the following:
query {
subscriptionFutureEntries {
nodes {
type
plan
name
email
company
usersInLicenseCount
startsAt
expiresAt
}
}
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #338657 (closed)
Edited by Mark Chao