Subscription not processing
See original GitHub issueOverview
When a subscription is created, it never produces a response. GraphiQL stays in the loading screen.
This is using the example code from this project and I haven’t made any changes. But I did try setting the confirm_subscriptions
option on the GraphqlWsConsumer
to True
, which didn’t change anything (I thought it might).
Environment
Python: 3.7.0
django: 2.2.1
django-channels-graphql-ws: 0.2.0
OS: Ubuntu 18.04.2 LTS
Steps to reproduce
-
Install dependencies
-
Run
./manage.py runserver
in theexample
directory -
Open GraphiQL at
http://127.0.0.1:8000/
-
Create a subscription:
subscription {
onChatMessageSent(chatroom: "room1", username: "testuser") {
message
}
}
No response will be given.
- Send a chat message:
mutation {
sendChatMessage(chatroom: "room1", username: "testuser", message: "testing") {
ok
}
}
There will still be no response from the subscription.
The following errors are thrown in the browser console:
Firefox can’t establish a connection to the server at ws://127.0.0.1:8000/graphql/.
The connection to ws://127.0.0.1:8000/graphql/ was interrupted while the page was loading.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Fix problems with subscriptions - Android - Google Play Help
Find missing subscriptions. If you can't find your subscriptions, check that you're signed in to the correct account. Make sure to sign in ......
Read more >App subscription not working - Apple Community
First, check out the "If you don't see the subscription that you're looking for" section of this article: View, change, or cancel your ......
Read more >Subscription not processing after lapse in payment. : r/ffxiv
It looks like I was getting an error at the end of the payment process due to using a vpn. I was unable...
Read more >How subscriptions work | Stripe Documentation
If the subscription is incomplete and you void the first invoice that's generated, the subscription updates to incomplete_expired . If you void the...
Read more >Troubleshoot Subscriptions - Tableau Help
However, if the background process is handling an extraordinarily large and complex dashboard, that may not be enough time. You can check the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @dspacejs ,
In the example in the
publish
method ofOnNewChatMessage
subscription there is such code:If you send messages as the
testuser
user and subscribe as thetestuser
user, then you do not receive notifications. In other words, being in a chat you only receive other people’s messages, but not your own. So you can changeusername
of the mutation to get notifications. Or you can comment out this condition to duplicate outgoing messages in your inbox.Does my answer help solve the problem?
It seems the original problem is solved, so I am closing this issue.