Skip to content

Query Limiting Depth #1472

Closed
Closed
@AstRonin

Description

@AstRonin

Is your feature request related to a problem? Please describe.
Graphene has query validation about Depth limit Validator (https://docs.graphene-python.org/en/latest/execution/queryvalidation/#depth-limit-validator).

validation_errors = validate(
    schema=schema.graphql_schema,
    document_ast=parse('THE QUERY'),
    rules=(
        depth_limit_validator(
            max_depth=20
        ),
    )
)

Would be great we will have it (depth) in django project.

Describe the solution you'd like
Limit depth of query. OWASP suggest add limit for security reason https://cheatsheetseries.owasp.org/cheatsheets/GraphQL_Cheat_Sheet.html#query-limiting-depth-amount

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions