Expose single member role in GraphQL
What does this MR do and why?
It adds a graphql endpoint that returns a single member role. The member role is searchable by id.
Graphql
Request
{
memberRole(id: "gid://gitlab/MemberRole/18") {
id
name
readVulnerability
readCode
adminGroupMember
}
}
Response
{
"data": {
"memberRole": {
"id": "gid://gitlab/MemberRole/18",
"name": "Role name",
"readVulnerability": true,
"readCode": true,
"adminGroupMember": false
}
}
}
How to set up and validate locally
- Create a member role, eg. using graphql
- Get that member role using the provided graphql query
Database
- I use Custom Roles Root Group for queries as we test custom roles there and have at least few records
Query plans
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #428772 (closed)
Edited by Jarka Košanová