Alter
Alter

Reputation: 3464

Django-Graphene: No module named 'graphql_jwt'

I'm trying to implement authentication with Django and GraphQL/graphene

I've run into the error No module named 'graphql_jwt'. and the solutions I've found don't seem to work

Reproducing

The code is available here:
https://github.com/altear/hello-GraphQL/tree/7ae1229b29f144f0f511d1b1a86edba36053dd86

git clone https://github.com/altear/hello-GraphQL.git
git checkout 7ae1229b29f144f0f511d1b1a86edba36053dd86

It uses docker-compose, so you should be able to run it with just docker-compose up -d --build

The error is immediately visible if you go to http://localhost:8000

What I've Tried

Other posts that have this error don't seem to be applicable:

Upvotes: 0

Views: 1921

Answers (1)

MatsLindh
MatsLindh

Reputation: 52822

The graphql-jwt module for Django is available as django-graphql-jwt.

You have to add this as an explicit dependency in your project unless it's a transitive dependency by one of the other projects (which according to the requirements.txt in your project and the setup.py's I looked briefly at, it isn't).

Upvotes: 3

Related Questions