Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

construction fails for depth around > 200 / resource exhaustion?

Open
#216 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
graphql, python
Domain
api, security

Research direction

Start by locating the recursive generation of the GraphQL request/input tree and the test for deep request construction mentioned in the issue. Reproduce the recursion failure with a depth above 200, then evaluate an iterative or generator-based approach and a node limit. Done means deep or oversized graphs fail safely with a clear error rather than exhausting resources.

Written by the indexing model from the issue text.

Description

Reporting issues with GraphQL-core 3

In my tests the construction of a deep request tree fails with recursion problems.
The problem is a recursive approach in the generation of the graphql request tree (this is why I created the test).

Next to denial of service it is most probably possible to cause resource exhaustion attacks by passing big graphs.

There should be two changes:

  • a "stack free" (not really stack free but the recursion depth is drastically reduced) approach in generating the input graph. I did something with generators in my project: graphene-protector:
    https://github.com/devkral/graphene-protector
  • a node limit after which the generation of the input graph is stopped with an error

I am not sure if the cost spec ( https://ibm.github.io/graphql-specs/cost-spec.html ) can fix this. The changes must take place while generating the requested input graph

Dominant language
Python
Stars
531
Forks
147
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from graphql-python/graphql-core

All issues in graphql-python/graphql-core

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.