Python Django Middleware
Installation
pip install inigo-py
Get token
- Set up a service and a token. If you still need one, follow Getting Started.
Integration
MIDDLEWARE = [
...
'inigo_py.django.Middleware',
]
INIGO = {
'TOKEN': os.environ.get('INIGO_SERVICE_TOKEN', ''),
'GRAPHENE_SCHEMA': 'app.schema.schema',
'PATH': '/graphql', # add '/' for custom paths, like '/gql/'
}
Other configuration options
Name | Type | Required | Description |
---|---|---|---|
TOKEN | string | Yes | Service token |
GRAPHENE_SCHEMA | string | No default: GRAPHENE.SCHEMA | Path to graphene schema instance |
PATH | string | No default: /graphql | Path to GraphQL schema file |
SCHEMA_PATH | string | No | Path to GraphQL schema file |
DEBUG | bool | No default: False | Enable debug mode |