Add pagination to graphql branch rules

What does this MR do and why?

Introduces pagination to branch rules with ForwardOnlyExternallyPaginatedArrayExtension and by consuming the new branch rules finder.

References

Related to #576206

Changes needed for pagination:

  1. Add new scope for branch rules pagination (!212621 - merged)
  2. Add new finder for branch rules pagination (!212623)
  3. Add pagination to graphql branch rules (!212624) <- you are here

Draft poc MR where you can see the changes in full context: !211451

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.

Related to #576206

Edited by Gavin Hinfey

Merge request reports

Loading