Skip to content

Draft: Add pagination to graphql branch rules type

What does this MR do and why?

This change adds pagination to the graphql BranchRuleType.

The implementation creates a new "finder" class that combines two types of branch rules (custom rules and protected branch rules) and serves them in paginated chunks.

References

Related to #576206

How to set up and validate locally

  1. Create a number of branch rules in a project

  2. Query the branch rules and use pagination

    {
      project(fullPath: "gitlab-org/gitlab-test") {
        name
        branchRules(first: 20) {
          nodes {
            name
          }
          pageInfo {
            hasNextPage
            endCursor
          }
        }
      }
    }

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Gavin Hinfey

Merge request reports

Loading