BE: Create graphql API to return count of users in each roles
Why are we doing this work
Scan Result Policy Action currently supports individual approvers or a group of users. However, when a customer has projects with lower criticality or the scan results detect a vulnerability of low criticality (I.e., Low/Medium), they want to require an approver from the project based on the role (I.e., owner/maintainer)
This issue focusses on creating a graphql query Project.projectMembersCountByRole
that returns the count of users in each role belonging to the project. This API can be used to show the count of users in each role.
Relevant links
Non-functional requirements
-
Documentation: -
Feature flag: -
Performance: -
Testing:
Implementation plan
-
backend Create Project.projectMembersCountByRole
graphql field toee/app/graphql/ee/types/project_type.rb
that fetches the count of project_members for the given project by role
Verification steps
Edited by Sashi Kumar Kumaresan