Skip to content

GraphQL Query Complexity Limit Exceeded in GitLab 18.4.2 #525

@jelenpivo

Description

@jelenpivo

Issue Description

After upgrading to GitLab 18.4.2, we're experiencing GraphQL query complexity limit errors when fetching multiple files from repository. The query complexity exceeds the maximum allowed limit of 300.

Error Details

Error Message:
Query has complexity of 1421, which exceeds max complexity of 300

Affected Query:

query($fullPath: ID!, $branch: String!, $paths: [String!]!) {
  project(fullPath: $fullPath) {
    repository {
      blobs(ref: $branch, paths: $paths) {
        nodes {
          size
          rawTextBlob
        }
      }
    }
  }
}

Variables:

{
  "branch": "main",
  "fullPath": "hosting/static-sites/medieval-princesses",
  "paths": ["content/en/_index.md", "content/en/articles/_index.md", ...] // 100 file paths
}

Reproduction Steps

  1. Execute GraphQL query with ~100 file paths in paths array
  2. Query complexity calculated as 1421
  3. Request fails with complexity limit error

Expected Behavior

Query should execute successfully or provide a way to handle large file batches within complexity limits.

Actual Behavior

Query fails with complexity limit error, breaking functionality that requires fetching multiple files.

Affected Projects

At least two other projects (confirmed complexity 1421 in both cases)

Environment

GitLab Version: 18.4.2
Sveltia v0.112.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions