Graphene-django: Support subscriptions

Created on 23 Feb 2017  路  16Comments  路  Source: graphql-python/graphene-django

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!

help wanted 鉁╡nhancement 馃憖 more info needed 馃摉 documentation

Most helpful comment

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.

All 16 comments

This is being talked about here in graphene

https://github.com/graphql-python/graphene/issues/430

Hi @thatneat, please, visit this module might interest you to use subscriptions on graphene-django

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?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MilanRgm picture MilanRgm  路  3Comments

flame0 picture flame0  路  4Comments

hyusetiawan picture hyusetiawan  路  4Comments

amiyatulu picture amiyatulu  路  3Comments

StefanoSega picture StefanoSega  路  4Comments