graphene-subscriptions icon indicating copy to clipboard operation
graphene-subscriptions copied to clipboard

Add ASGI implementation

Open jaydenwindle opened this issue 5 years ago • 1 comments

Since Django 3.0 supports ASGI out of the box, this library doesn't necessarily need to rely on Django Channels as a dependency for newer Django projects. Instead, we could create a custom ASGI application, and use it to handle GraphQL websocket connections.

We would still need a pub/sub layer, but could use aioredis directly. This would make the code much easier to understand, since sending data to the client and responding to pub/sub events could be decoupled.

Some thoughts on implementing a custom websocket ASGI app for Django: https://jaydenwindle.com/writing/django-websockets-zero-dependencies/

jaydenwindle avatar Feb 04 '20 23:02 jaydenwindle

Nice Jayden! Will check out the post a bit later, but this makes perfect sense!

levinotik avatar Feb 05 '20 00:02 levinotik