-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not import 'smvc.schema.schema' for Graphene setting 'SCHEMA'. AttributeError: module 'graphene' has no attribute 'AbstractType'. #1342
Comments
Hi @s-mrb I tried to downgrade graphene to v2 but I could not restart the server back. I'm thinking of starting a new project and copy some of the work that have already been done on the current broken project. Thanks. |
@s-mrb so I decided to start a fresh project but still stuck on authentication with JWT as this time I cannot query the logged in user even though I'm following every step of the tutorial including mutating the tokenAuth and use it with Authorization HTTP header (Authorization: JWT ) with Insomnia. Other settings are in place including middleware and authentication_backends. Error I get:
My Package List: settings.py
users/schema.py
smvc_v2/smvc_v2/schema.py
Please help. |
This is for anyone using graphene 3 or later and encounter the error while following the tutorial. AttributeError: module 'graphene' has no attribute 'AbstractType' Update your code with AbstractType is deprecated in version 3 and later of graphene. |
I'm trying to setup JWT Authorization with Graphene but I get this error Could not import 'smvc.schema.schema' for Graphene setting 'SCHEMA'. AttributeError: module 'graphene' has no attribute 'AbstractType'. when I try test it on GraphiQL and Insomnia. Is AbstractType no longer included in Graphene?
This error occurs when I do a query for authorizing a user to login with JWT using Insomnia, the headers are in place Content-Type and Authorization (as instructed here on the tutorial https://www.howtographql.com/graphql-python/4-authentication/ or here on git repo https://github.com/howtographql/howtographql/blob/master/content/backend/graphql-python/4-authentication.md) but it won't login the user. I have django admin user and normal user, they bring same error.
File Path: smvc/users/schema.py
Contents:
If anyone has a way around to resolve or go around this error, I'll appreciate your help.
My Packages:
python: 3.9.5
django: 3.2.5
django-filter: 2.4.0
django-graphql-jwt: 0.3.2
graphene: 3.0b7
graphene-django: 3.0.0b7
graphql-core: 3.1.5
graphql-relay: 3.1.0
mysqlclient: 2.0.3
pyjwt: 2.1.0
Error Snippets:
Browser
Insomnia
The text was updated successfully, but these errors were encountered: