Skip to content

Use reorder instead of reorder!

Sincheol (David) Kim requested to merge use-reorder-instead-of-reorder! into master

What does this MR do and why?

Fixes a ActiveRecord::ImmutableRelation error with approvals queries. If suggested_approvers and committers are in the same query GraphQL will throw a ActiveRecord::ImmutableRelation because the committers query has been loaded and memoized. Run the below query to see this happening:

query {
  project(fullPath:"gitlab-org/gitlab") {
    mergeRequest(iid:"104092") {
      approvalState {
        suggestedApprovers {
          nodes {
            id
          }
        }
      }
      committers {
        nodes {
          id
        }
      }
    }
  }
}

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sincheol (David) Kim

Merge request reports