Skip to content

Introduce new fields to GraphQL ProjectType

What does this MR do and why?

This is part of the ongoing Organization work by the grouptenant scale group. Read the blueprint to learn more https://docs.gitlab.com/ee/architecture/blueprints/organization/index.html.

Fields introduced are:

  • issuesAccessLevel
  • mergeRequestsAccessLevel
  • forkingAccessLevel
  • openMergeRequestsCount

These fields are required to create organization-related pages and these fields are already exposed through the projects APIs.

How to set up and validate locally

Run the following query on GraphiQL https://gdk.test:3000/-/graphql-explorer:

Query
{
  project(fullPath: "twitter/typeahead.js") {
    id
    issuesAccessLevel {
      integerValue
      stringValue
    }
    mergeRequestsAccessLevel {
      integerValue
      stringValue
    }
    forkingAccessLevel {
      integerValue
      stringValue
    }
    openMergeRequestsCount
    openIssuesCount
  }
}
Output
{
  "data": {
    "project": {
      "id": "gid://gitlab/Project/8",
      "issuesAccessLevel": {
        "integerValue": 20,
        "stringValue": "ENABLED"
      },
      "mergeRequestsAccessLevel": {
        "integerValue": 20,
        "stringValue": "ENABLED"
      },
      "forkingAccessLevel": {
        "integerValue": 20,
        "stringValue": "ENABLED"
      },
      "openMergeRequestsCount": 1,
      "openIssuesCount": 35
    }
  }
}

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 #421442 (closed)

Merge request reports

Loading