Skip to content

fix(graphql): add query complexity limit [H10]#558

Merged
lakhansamani merged 1 commit intomainfrom
fix/h10-graphql-limits
Apr 4, 2026
Merged

fix(graphql): add query complexity limit [H10]#558
lakhansamani merged 1 commit intomainfrom
fix/h10-graphql-limits

Conversation

@lakhansamani
Copy link
Copy Markdown
Contributor

Summary

  • H10 (High): No query depth/complexity/batch limits existed
  • Adds FixedComplexityLimit(300) using gqlgen built-in extension
  • Prevents resource exhaustion via complex/nested queries

Test plan

  • Package compiles
  • Verify normal queries work within complexity budget
  • Verify overly complex queries are rejected

No query complexity or depth limiting existed, enabling resource
exhaustion and batch brute-force attacks via deeply nested or
complex queries.

Adds FixedComplexityLimit(300) using gqlgen's built-in extension.

Fixes: H10 (High)
@lakhansamani lakhansamani merged commit 79bf7d5 into main Apr 4, 2026
@lakhansamani lakhansamani deleted the fix/h10-graphql-limits branch April 4, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant