Skip to main content

Graphql backend that assists you in securing your GraphQL API against malicious queries

Project description

graphql-limits

Features included:

Prerequisites

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})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphql-limits-0.1.1.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

graphql_limits-0.1.1-py2.py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page