This is a Graphene Django middleware to check JWT in GraphQL schemas.
with pipenv:
pipenv install graphene-django-jwt-middleware
or poetry:
poetry add graphene-django-jwt-middleware
In your django settings.py
file, find GRAPHENE
configuration and insert at the MIDDLEWARE
section:
...
GRAPHENE = {
"SCHEMA": "...",
'MIDDLEWARE': [
'graphene_django_jwt_middleware.middleware.JWTAuthorizationMiddleware'
]
}
...