Optimise GraphQL `UserInterface.contributedProjects` field
About
This MR came out of this discussion. See that discussion for more context.
We would like to optimise the UserInterface.contributedProjects
field, to avoid N+1 issues when executing requests like:
{
project(fullPath: "gitlab-org/gitlab-test") {
mergeRequests {
nodes {
author {
contributedProjects {
id
}
}
}
}
}
}
Related: https://docs.gitlab.com/ee/development/api_graphql_styleguide.html#optimizations
Edited by Luke Duncalfe