MaxAliasesLimiter

This extension adds a validator to limit the maximum number of aliases in a GraphQL document.

Usage example:

import strawberry
from strawberry.extensions import MaxAliasesLimiter
schema = strawberry.Schema(
Query,
extensions=[
MaxAliasesLimiter(max_alias_count=15),
],
)

API reference:

class MaxAliasesLimiter(max_alias_count): ...

max_alias_count: int

The maximum allowed number of aliases in a GraphQL document.

Was this helpful? What can we improve?

Edit on Github

Newsletter 💌

Do you want to receive the latest updates on Strawberry? Subscribe to our newsletter!