GitLab 18.4.2 introduced GraphQL query complexity bug
I’m the maintainer of Sveltia CMS, a Git-based headless CMS that supports GitLab. Some of our users have reported experiencing GraphQL query complexity limit errors after upgrading to GitLab 18.4.2.
Original report: https://github.com/sveltia/sveltia-cms/issues/525
This is our query:
query($fullPath: ID!, $branch: String!, $paths: [String!]!) {
project(fullPath: $fullPath) {
repository {
blobs(ref: $branch, paths: $paths) {
nodes {
size
rawTextBlob
}
}
}
}
}
I tested this manually with queryComplexity added. It works with one path, but fails even with 2.
Query has complexity of 346, which exceeds max complexity of 250
The score jumps with multiple paths:
1 path: 35
2 paths: 346
3 paths: 357
4 paths: 368
5 paths: 379
Sveltia CMS has worked well with 100 paths per request, as noted in our code:
15 + (2 * node size) so 100 paths = 215 complexity
Our product is useless for GitLab users until the bug has been solved.
Edited by 🤖 GitLab Bot 🤖