DjangoChannelsGraphqlWs
DjangoChannelsGraphqlWs copied to clipboard
Graphene v3 support?
is there any plan to support v3 of graphene? if it's already in the roadmap, i can help to test :)
I was playing around with this a bit earlier but I couldn't quite get it working. I fear I'm not familiar enough with the recent changes.
@prokher is this on your roadmap by any chance? or are you guys staying on v2?
Any update?
As far as I see, v3 is not released yet. I see only the beta version v3.0.0.b6 available. Once the final/stable release is here, I will try to migrate DjangoChannelsGraphqlWs
if possible.
BTW, didn't they implemented the WebSocket protocol with subscriptions on their own? 🤔 Honestly speaking, I think that the functionality implemented here in DjangoChannelsGraphqlWs
should be implemented in the Graphene one day.
@prokher , it appears they have a desire to wait for two daughter projects, who have pinned to graphene<3
. So waiting for Godot... It would be really awesome to have Graphene v3 support here (I agree natively would be better), as there are cool libraries (RxDB graphql sync, for example) that require modern graphql.
With the two daughter projects now supporting graphene v3, it looks like we are finally heading towards a release: https://github.com/graphql-python/graphene/issues/1127#issuecomment-923616738. Are there still plans for DjangoChannelsGraphqlWs
to support graphene v3?
As far as I see, Graphene v3 is still in beta. We will proceed as soon as stable version is here.
@prokher graphene is still in beta, but should release shortly as the rest of the ecosystem has now gained v3 support. The API is not going to change at this point, so I don't see a reason why this project shouldn't plot a course for v3.
I will take another look at this tomorrow and see what the state of the universe is.
Graphene v3 has just been released :D https://github.com/graphql-python/graphene/releases/tag/v3.0.0
Would be great to have this! Looks like the graphql-ws also doesn't support graphene 3 so at the moment there is no option for Graphene3 and WS integration https://github.com/graphql-python/graphql-ws/issues/66 https://github.com/graphql-python/graphql-ws/issues/49
Apparently, integration with graphene 3 is not so simple.
Apparently, integration with graphene 3 is not so simple.
Definitely agree, I ended up having a custom solution for our use-case which circumvents the GraphQL engine on return of the message. I can see how it is tricky with the new Graphene3 ExecutionResult and it seems like it might be hard to have a generic solution, one good example might be how https://github.com/jaydenwindle/graphene-subscriptions is working with Rx Subjects.
I've spent a bit of time trying to do this refactor, got some of the way there but hit a wall when using broadcast
on a Subscription - can't seem to receive the broadcast
messages on the django channels consumer 🤷♂️ Here's the branch I'm working on:
https://github.com/tomjohnhall/DjangoChannelsGraphqlWs/tree/gql-graphene-3
Concepts like asyncio and Rx are new to me so this is mostly trial and error. If anyone with a better grasp is interested in taking a look or comparing their own implementation, please do!
The version 1.0.0rc1 is available in PyPI, it supports latest Django & Graphene, so I am closing this. Feel free to reopen or file a new issue in case of problems.