Skip to content
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

No root query / Empty explorer #33

Closed
ezawadzki opened this issue Oct 26, 2021 · 2 comments
Closed

No root query / Empty explorer #33

ezawadzki opened this issue Oct 26, 2021 · 2 comments

Comments

@ezawadzki
Copy link

Hi,

I tried to installed your package, followed setup.

Issue :

No root query appearing and the explorer is empty.

image

Django console :

[26/Oct/2021 13:18:21] "POST /graphql/ HTTP/1.1" 403 2519 Forbidden (CSRF token missing or incorrect.): /graphql/

Config:
python 3.9.1
Django==3.2.8
graphene==2.1.9
graphene-django==2.15.0
graphene-graphiql-explorer==0.0.1
graphql-core==2.3.2
graphql-relay==2.0.1

Any idea ?

@creimers
Copy link
Owner

Try this in your urls.py:

from django.views.decorators.csrf import csrf_exempt

...
path("graphql/", csrf_exempt(GraphQLView.as_view(graphiql=True)), name="graphql"),
...

@ezawadzki
Copy link
Author

@creimers thanks for you quick replay, that was it !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants