Skip to main content

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

NameTypeRequiredDescription
TOKENstringYesService token
GRAPHENE_SCHEMAstringNo
default:GRAPHENE.SCHEMA
Path to graphene schema instance
PATHstringNo
default:/graphql
Path to GraphQL schema file
SCHEMA_PATHstringNoPath to GraphQL schema file
DEBUGboolNo
default: False
Enable debug mode