Skip to content

Expose single member role in GraphQL

Jarka Košanová requested to merge 428772-expose-member-role into master

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

  1. Create a member role, eg. using graphql
  2. Get that member role using the provided graphql query

Database

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.

Related to #428772 (closed)

Edited by Jarka Košanová

Merge request reports

Loading