Added gql query to get list of pending memberApprovals for group/project
What does this MR do and why?
Added gql query to get list of pending memberApprovals for group/project
- We already share the pending members through the controllers(project, group).
- This query exposes the same data through graphql to allow frontend to query just this data and make UI changes if required.
PS: These changes are currently behind a feature-flag and not available on prod.
Changelog: added EE: true
ref: #474218 (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
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Graphiql for Project
GraphiQL for Group
How to set up and validate locally
- Go to your local graphiql page
http://localhost:3000/-/graphql-explorer
- Ensure you have pending MembersApproval. Follow steps mentioned here to add some.
- Check the list for Group and Project
-
Sample
group
queryquery { group(fullPath: "gitlab-org") { pendingMemberApprovals(first:1) { edges { node { user { id username } member { __typename id accessLevel { stringValue } } createdAt newAccessLevel { stringValue } oldAccessLevel { stringValue } status } } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } } }
-
Sample
project
queryquery { project(fullPath: "gitlab-org/gitlab-shell") { pendingMemberApprovals(first:1) { edges { node { user { id username } member { __typename id accessLevel { stringValue } } createdAt newAccessLevel { stringValue } oldAccessLevel { stringValue } status } } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } } }
-
Edited by Suraj Tripathi