2π
You should use the right path of your project in settings.py
GRAPHENE = {
'SCHEMA': 'django_root.schema.schema' # change your path
}
Where path.schema.schema is the location of the Schema object in your Django project.
π€everfight
2π
'SCHEMA': 'addyourappnamehere.schema.schema',
faced the same error
this worked
i added the app name
eg:
'SCHEMA': 'auth.schema.schema',
π€fuse
0π
The problem is you have to address the path where your schema.py
is located. For example, the app name in which you have looks like the following project outline:
django_project
βββ app_name
β βββ model.py
β βββ schema.py
β βββ ...
βββ django_project
β βββ settings.py
β βββ ...
βββ ...
Now into the settings.py
add the following lines:
INSTALLED_APPS = (
# ...
'app_name',
'django.contrib.staticfiles', # Required for GraphiQL
'graphene_django',
)
GRAPHENE = {
'SCHEMA': 'app_name.schema.schema' # Where your Graphene schema lives
}
[NOTE]:
You can also follow this instruction step by step.
π€Benyamin Jafari
Source:stackexchange.com