8000 GraphiQL not loading when using Uvicorn ASGI · Issue #963 · graphql-python/graphene-django · GitHub
[go: up one dir, main page]

Skip to content

GraphiQL not loading when using Uvicorn ASGI #963

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

Closed
ccsv opened this issue May 14, 2020 · 4 comments
Closed

GraphiQL not loading when using Uvicorn ASGI #963

ccsv opened this issue May 14, 2020 · 4 comments

Comments

@ccsv
Copy link
Contributor
ccsv commented May 14, 2020
  • What is the current behavior?
    When running the site using Uvicorn the graphiql page does not load but the rest of the Django site works fine
[32mINFO[0m:     127.0.0.1:52463 - "GET /static/graphene_django/graphiql.js HTTP/1.1" 404
Not Found: /static/graphene_django/graphiql.js
  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
  1. Install Django with a graphene endpoint and Uvicorn

  2. Run uvicorn MYSITE.asgi:application in the command line replacing MYSITE with your site name

  3. Navigate to the Graphene endpoint (graphiql terminal page)

  4. Check the command line output

  • What is the expected behavior?

Expected behavior should be the same as when running python manage.py runserver you get a POST for the graphql

[13/May/2020 19:53:01] "GET /static/graphene_django/graphiql.js HTTP/1.1" 200 2958
[13/May/2020 19:53:01] "POST /graphql/ HTTP/1.1" 200 24772
  • What is the motivation / use case for changing the behavior?

Making graphene-django compatible with ASGI

  • Please tell us about your environment:

    • Version: Python 3.82

asgiref==3.2.7
Django==3.0.5
django-graphiql==0.4.4
graphene==2.1.8
graphene-django==2.9.0
uvicorn==0.11.3

  • Platform: Windows 10
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)

Posted Stackoverflow question a month ago here with no answer so I suspect it is a bug

@ccsv ccsv added the 🐛bug label May 14, 2020
@jkimbo
Copy link
Member
jkimbo commented May 14, 2020

@ccsv have you run ./manage.py collectstatic?

@EverWinter23
Copy link
Contributor
EverWinter23 commented May 22, 2020

On the GraphiQL page open console and check the requests that it makes-- does it return the js/css static files? If not use @jkimbo's suggestion.

@mrcyme
Copy link
mrcyme commented Feb 10, 2021

@ccsv did you find a solution ? I am facing the same problem and couldn't find any solution.
Thanks

@mnasiri
Copy link
Contributor
mnasiri commented Sep 19, 2023

fix same issue here in new versions

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

No branches or pull requests

6 participants
0