Subscription support was added to graphene in graphql-python/graphene#35. It would be awesome to have it built in to graphene-django so that we can build real-time apps with it!
This is being talked about here in graphene
Hi @thatneat, please, visit this module might interest you to use subscriptions on graphene-django
Subscriptions added in v2 https://github.com/graphql-python/graphene/releases/tag/v2.0.0
Reopening to add native support for subscriptions using channels
@eamigo86 what are your thoughts regarding adding subscriptions to the django-graphene repo?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@firaskafri @eamigo86 The package graphene-subscriptions has great integration of GraphQL subscriptions with Django models. Probably it would be valueable to get in contact with the lead dev for possible integration as well.
So there is no advised way to do that?
I am also a bit hesitant to use graphene-subscriptions since the last commit was nearly half a year ago.
Are subscriptions on the roadmap? Is there such a thing? 馃槉
@jkimbo Around 3.2 or 3.3 maybe? I can allocate some time for this.
I'm reopening the issue btw. This is a missing feature in graphene-django side, that's for certain.
Hi all! Author of graphene-subscriptions here 馃槉
It would be awesome to see subscriptions support added to graphene-django. I'm happy to submit a PR with my subscriptions implementation if there is interest in integrating it into this library.
One challenge with implementing subscriptions in graphene-django v2 right now is that you need to stitch together the async-based pattern that Django Channels uses with the Observable-based pattern used in graphene. This is what graphene-subscriptions does currently.
(Side note: @Eraldo I can definitely understand your concern there! Rest assured that I'm still actively supporting it (I'm hoping to ship graphene-subscriptions v2 very soon). Feel free to open an issue or DM me if you have any questions!)
Once graphene-django v3 ships with support for async resolvers, implementing built-in support for subscriptions will be much simpler and the implementation will be much cleaner.
@jkimbo I would love to help ship subscriptions support for graphene-django if that's something you and the team would be interested in supporting natively.
Also, if you're looking for an alternative, I'm the author of the graphql-ws branch handling django channels 2 subscriptions. Hopefully will have that merged to master soon (but actively using the branch in a pre-production environment successfully).
Seems like there's gaining traction on multiple solutions that are getting this done. Also happy to help work on (or consult on) a built in solution if it fits.
This seems to be another option that I want to include for completion's sake: https://github.com/datadvance/DjangoChannelsGraphqlWs
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Any updates? hopeful-eyes
Any clue which 3rd party library is more/less likely to make it into graphene-django at some point?
Most helpful comment
Hi all! Author of
graphene-subscriptionshere 馃槉It would be awesome to see subscriptions support added to
graphene-django. I'm happy to submit a PR with my subscriptions implementation if there is interest in integrating it into this library.One challenge with implementing subscriptions in
graphene-djangov2 right now is that you need to stitch together theasync-based pattern that Django Channels uses with theObservable-based pattern used ingraphene. This is whatgraphene-subscriptionsdoes currently.(Side note: @Eraldo I can definitely understand your concern there! Rest assured that I'm still actively supporting it (I'm hoping to ship
graphene-subscriptionsv2 very soon). Feel free to open an issue or DM me if you have any questions!)Once
graphene-djangov3 ships with support forasyncresolvers, implementing built-in support for subscriptions will be much simpler and the implementation will be much cleaner.@jkimbo I would love to help ship subscriptions support for
graphene-djangoif that's something you and the team would be interested in supporting natively.