Skip to content

Add details page path to GraphQL roles data

Daniel Tian requested to merge 468353-add-details-path-to-roles into master

What does this MR do and why?

On the Admin -> Settings -> Roles and Permissions page, a list of custom roles is shown. In a previous MR, we added a role details page to show the details for a custom role. In a future MR, we want to link from the list page to the show page. This MR adds the details page path to the GraphQL query so that frontend knows where to link to.

Custom roles page Role details page New detailsPath for self-managed query New detailsPath for SaaS query
ksnip_20240905-002121 ksnip_20240905-002243 ksnip_20240905-002536

How to set up and validate locally

For self-managed, please follow this video with audio commentary:

2024-09-05_00-42-30

GraphQL query
query {
  standardRoles {
    nodes {
      detailsPath
    }
  }
  memberRoles {
    nodes {
      detailsPath
    }
  }
}

For SaaS, run these shell commands to enable SaaS mode locally:

export GITLAB_SIMULATE_SAAS=1
gdk restart

Then follow this video with audio commentary:

2024-09-05_00-45-14

GraphQL query
query {
  group(fullPath: "twitter2") {
    standardRoles {
      nodes {
        detailsPath
      }
    }
    memberRoles {
      nodes {
        detailsPath
      }
    }
  }
}

Related to #468353 (closed)

Edited by Daniel Tian

Merge request reports

Loading