GraphQl Query to list selfManagedUsersQueuedForRolePromotion for admin
What does this MR do and why?
- This MR adds graphql query capability to get MemberApproval objects corresponding to the highest new_access_level, for each user.
- Adds the Scope, Finder, Resolver, Type, QueryType for the above
EE: true Changelog: added
ref: #433175
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.
How to set up and validate locally
- Navigate to http://localhost:3000/-/graphql-explorer (ensure you have queued pending promotion members)
-
Query
{ selfManagedUsersQueuedForRolePromotion(first:3, after:"eyJ1c2VyX2lkIjoiMyIsIm5ld19hY2Nlc3NfbGV2ZWwiOiIzMCIsImlkIjoiNTkifQ") { count nodes { user { id username } newAccessLevel { stringValue } } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } }
-
Validate sample response
{ "data": { "selfManagedUsersQueuedForRolePromotion": { "count": 13 "nodes": [ { "user": { "id": "gid://gitlab/User/3", "username": "annamae.johns" }, "newAccessLevel": { "stringValue": "DEVELOPER" } }, { "user": { "id": "gid://gitlab/User/4", "username": "marva_schoen" }, "newAccessLevel": { "stringValue": "DEVELOPER" } }, { "user": { "id": "gid://gitlab/User/5", "username": "theressa.gislason" }, "newAccessLevel": { "stringValue": "DEVELOPER" } } ], "pageInfo": { "hasNextPage": true, "hasPreviousPage": true, "startCursor": "eyJ1c2VyX2lkIjoiMyIsIm5ld19hY2Nlc3NfbGV2ZWwiOiIzMCIsImlkIjoiNDkifQ", "endCursor": "eyJ1c2VyX2lkIjoiNSIsIm5ld19hY2Nlc3NfbGV2ZWwiOiIzMCIsImlkIjoiNjEifQ" } } } }
-
Edited by Suraj Tripathi