【发布时间】:2019-12-09 20:36:24
【问题描述】:
我是 django(在我的 virtualenv 中安装了 2.2 版)和 graphql 的新手。我尝试按照以下站点的说明在 django 中设置 graphql
https://docs.graphene-python.org/projects/django/en/latest/installation/
当我尝试使用 url http://127.0.0.1:8000/graphql/ 运行服务器时
我收到以下错误。
ImportError at /graphql/
Could not import 'django_root.schema.schema' for Graphene setting
'SCHEMA'. ModuleNotFoundError: No module named 'django_root'.
我仔细按照说明进行操作,但无法做到这一点。请帮忙。我检查了类似的问题,但没有帮助。
编辑: 我尝试了以下
'SCHEMA': 'folder_with_setting.py_file.schema.schema'
'SCHEMA': 'folder_with_manage.py_file.schema.schema'
'SCHEMA': 'folder_with_manage.py_file.folder_with_settings.py_file.schema.schema'
'SCHEMA': 'folder_with_manage.py_file/folder_with_settings.py_file.schema.schema'
和许多其他组合。它不工作。
【问题讨论】: