DjangoChannelsGraphqlWs icon indicating copy to clipboard operation
DjangoChannelsGraphqlWs copied to clipboard

Graphene v3 support?

Open hyusetiawan opened this issue 4 years ago • 12 comments

is there any plan to support v3 of graphene? if it's already in the roadmap, i can help to test :)

hyusetiawan avatar Aug 02 '20 08:08 hyusetiawan

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.

qeternity avatar Aug 30 '20 20:08 qeternity

@prokher is this on your roadmap by any chance? or are you guys staying on v2?

qeternity avatar Sep 14 '20 14:09 qeternity

Any update?

MJoshua25 avatar Dec 01 '20 12:12 MJoshua25

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 avatar Dec 05 '20 23:12 prokher

@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.

AntonOfTheWoods avatar Feb 27 '21 14:02 AntonOfTheWoods

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?

JamieOWilliams avatar Sep 21 '21 21:09 JamieOWilliams

As far as I see, Graphene v3 is still in beta. We will proceed as soon as stable version is here.

prokher avatar Sep 22 '21 11:09 prokher

@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.

qeternity avatar Sep 22 '21 20:09 qeternity

Graphene v3 has just been released :D https://github.com/graphql-python/graphene/releases/tag/v3.0.0

Ouradze avatar Nov 15 '21 09:11 Ouradze

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

marcinocto avatar Jan 28 '22 16:01 marcinocto

Apparently, integration with graphene 3 is not so simple.

Luferov avatar Feb 06 '22 17:02 Luferov

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.

marcinocto avatar Feb 08 '22 10:02 marcinocto

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!

tomjohnhall avatar Nov 05 '22 16:11 tomjohnhall

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.

prokher avatar Apr 27 '23 21:04 prokher