Skip to content

GraphQL: Add preview billable user change to group/project

Ryan Cobb requested to merge rc/preview_billable_user_change_graphql into master

What does this MR do and why?

Issue: #354768 (closed)

This adds the field gitlabSubscriptionsPreviewBillableUserChange to group and project. It mostly just hooks up the service introduced in !88970 (merged).

Example query:

query {
	group(fullPath: "h5bp") {
    gitlabSubscriptionsPreviewBillableUserChange(addGroupId: 1, addUserEmails["foo@bar.com"], addUserIds: [1], role: DEVELOPER) {
      hasOverage,
      seatsInSubscription,
      newBillableUserCount
    }
  }
}

This will be used when adding a group or users to a group or project to preview the impacts it will have on the billable member count (i.e. if it will result in a seat overage for the gitlab subscription).

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Ryan Cobb

Merge request reports