Add subscription_history to Namespace GraphQL Type
What does this MR do and why?
Initial discussions in !159933 (closed)
This is the last of a series of MRs to implement https://gitlab.com/gitlab-org/gitlab/-/issues/355985 as part of https://gitlab.com/groups/gitlab-org/-/epics/14290
Proof of Concept (to see the whole picture): !159045 (closed)
In this MR we:
- Create
Types::GitlabSubscriptions::SubscriptionHistoryType
- Add
subscription_history
toEE::Types::NamespaceType
using the above type - Add
declarative_policy_subject
to delegate the authorization to thenamespace
MR Cadence
MR | description |
---|---|
!159901 (merged) | Add .by_namespace scope to GitlabSubscriptions::SubscriptionHistory |
!159921 (merged) | Add relation between Namespace and GitlabSubscriptions::SubscriptionHistory |
!159933 (closed) |
|
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
N/A
How to set up and validate locally
- Switch to this MR's branch
- Open GraphQL Explorer: https://gdk.test:3443/-/graphql-explorer
- Run the following query:
query getSubscriptionHistory( $fullPath: ID! $before: String $after: String $first: Int $last: Int ) { namespace(fullPath: $fullPath) { subscriptionHistory(after: $after, before: $before, first: $first, last: $last) { nodes { createdAt startDate endDate seats seatsInUse maxSeatsUsed changeType } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } } } ----- variables ---- { "fullPath": "my-group-name", "first": 2 }
Edited by Sheldon Led