Hello! I recently deployed a project I'm working on to production. I use graphene-subscriptions and I have GraphQL Playground set up via django-graphql-playground. Everything works fine locally - there are no issues whatsoever. However, when I deployed I get the error below when I hit the Play button in Playground:
{
"error": "Could not connect to websocket endpoint wss://api-such.andsuch.xyz/graphql/. Please check if the endpoint url is correct."
}
I use Gunicorn with a Uvicorn worker class in production. I even used the Gunicorn command locally to see if the issue could be from there but it works. One thing to note is that the application is dockerized. Could it be from there? I don't think so because it works locally. Here's what my docker-compose file looks like:
Hello! I recently deployed a project I'm working on to production. I use
graphene-subscriptions
and I have GraphQL Playground set up viadjango-graphql-playground
. Everything works fine locally - there are no issues whatsoever. However, when I deployed I get the error below when I hit the Play button in Playground:I use Gunicorn with a Uvicorn worker class in production. I even used the Gunicorn command locally to see if the issue could be from there but it works. One thing to note is that the application is dockerized. Could it be from there? I don't think so because it works locally. Here's what my
docker-compose
file looks like:settings.py
urls.py
What could be wrong? I'm outta ideas. Thanks!