Skip to content

Add basic GraphQL for a Group

Brett Walker requested to merge bw-add-graphql-groups into master

What does this MR do?

Adds a very basic GraphQL query for a Group. We add a GroupType and a NamespaceType.

Group attributes :statistics, :custom_attributes, :projects and :shared_projects are not initially supported in order to keep the initial implementation small.


Example Query

{
  group(fullPath: "h5bp/first-level-subgroup") {
    id
    webUrl
    name
    path
    description
    visibility
    lfsEnabled
    avatarUrl
    requestAccessEnabled
    fullPath
    fullName
    parent {
      id
      name
      fullPath
    }
  }
}

Results

{
  "data": {
    "group": {
      "id": "59",
      "webUrl": "http://ce.gitlab.dev:5000/groups/h5bp/first-level-subgroup",
      "name": "First Level Subgroup",
      "path": "first-level-subgroup",
      "description": "",
      "visibility": "private",
      "lfsEnabled": true,
      "avatarUrl": null,
      "requestAccessEnabled": false,
      "fullPath": "h5bp/first-level-subgroup",
      "fullName": "H5bp / First Level Subgroup",
      "parent": {
        "id": "8",
        "name": "H5bp",
        "fullPath": "h5bp"
      }
    }
  }
}

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/60786

Edited by Brett Walker

Merge request reports