Create new GraphQL resolver that determines user overage modal rendering
Problem
We only want to show a user overage modal in GL if the group where the user's permissions are being increased from guest has an Ultimate subscription and has reconciliation enabled, and it would cause the Seats owed
number to increase. We need a way to tell the FE whether or not those requirements are met.
Proposal
We can add a new Resolver
in GitLab similar to PreviewBillableUserChangeResolver. We will want it to be able to check whether the group user's permissions are being increased from guest has an Ultimate subscription and has reconciliation enabled first. This is because this is a less intense computation than calculating the new_billable_user_count.
- This is to avoid making multiple individual GraphQL calls to various endpoints by the frontend, instead grouping everything in the backend and forwarding the result
- We can exit the evaluation early if either reconciliation or plan status are not correct for this scenario
- Additionally, this will live in GL rather than CDot because the
new_billable_user_count
can only be calculated from there because it has access to what role the users are. CDot knows about the plan level and reconciliation status, but not the roles. - To avoid calls going out to multiple places, I'm opting to group everything on the GL side since that's where the component resides.
Next steps (if any)
Update workflow status from workflowblocked on Only show Ultimate group user additional charge... (gitlab#391532) when complete
Consume the field in the FE (gitlab#391532)