Skip to content

Consider GraphQL for merged_at project/group MR filters

In gitlab-jh/status-reports!4 (comment 527481478) we found that using merged_at over the gitlab-org group was quite lengthy and needed to consider using updated_at as the indicator for the policy.

This caused a problem that led to another workaround with gitlab-jh/status-reports!5 (merged)

Proposal

Could mergedAt filters for MRs use GraphQL for a more performant selection for large groups?

As an example:

Query

query ($sourceId: ID!, $mergedAfter: Time!) {
  group(fullPath: $sourceId) {
    mergeRequests(mergedAfter: $mergedAfter) {
      nodes {
        webUrl
        mergedAt
        author {
          id
          username
          groupMemberships {
            nodes {
              group {
                id
                fullPath
              }
            }
          }
        }
      }
    }
  }
}
{
  "sourceId":"gitlab-org",
  "mergedAfter": "2021-03-20T00:00:00+00:00"
}