graphql-limits 0.1.1

Creator: bradpython12

Last updated:

Add to Cart

Description:

graphqllimits 0.1.1

graphql-limits
Features included:

Limit Query Depth
Limit Query Nodes

Prerequisites

graphql-core

Installation

pip install graphql-limits

Usage example
query_string = '''
query Test($first: Int) {
viewer {
books(first: $first) {
author {
books(first: 4) {
author {
books(first: 100) {
author {
id
}
}
}
}
}
}
}
}
'''
schema = graphene.Schema(query=Query)
backend = ProtectorBackend(nodes_limit=399, depth_limit=5, variable_values={'first': 2})
result = schema.execute(query_string, backend=backend, variable_values={'first': 2})

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.