jaydenwindle / graphene-subscriptions

A plug-and-play GraphQL subscription implementation for Graphene + Django built using Django Channels.
MIT License
115 stars 15 forks source link

Added GraphQL Playgrounds #25

Open shreyas44 opened 4 years ago

shreyas44 commented 4 years ago

Integrated GraphQL Playgrounds with the library

Resolves #9, uses GraphQL Playgrounds instead of GraphiQL which also supports subscriptions.

Let me know if you want me to update the README :)

jaydenwindle commented 4 years ago

@shreyas44 Thanks so much for the PR! This looks awesome. I'd love to merge this in :)

Can you update the README so that the getting started instructions mention how to set up the GraphQL playground view to test subscriptions?

shreyas44 commented 4 years ago

@jaydenwindle I updated the README. Check it out and let me know if anything else needs to be changed!

singlerider commented 3 years ago

The instructions in @shreyas44's branch are still missing from the existing README, providing what seem to be a critical piece of the puzzle to get this working. What's the status of this?

shreyas44 commented 3 years ago

Hey @singlerider! You can check out the master branch in my fork where I've merged this branch as well as the branch in https://github.com/jaydenwindle/graphene-subscriptions/pull/28. The fork is not published to Pypi though, so you would have to download it and add it directly from the repo.

singlerider commented 3 years ago

@shreyas44 thank you for the quick reply, but I'm still having all kind of trouble getting any implementation of Subscriptions working in Django. For example, I'm getting

TypeError: GraphqlSubscriptionConsumer() takes no arguments

From my project that's using both your fork and this main repository.

Do you have a sample project actually using this library that functions? I'll need to make sure I have the right dependency versions installed and most of these libraries are showing their age. I'm on Python 3.9.0 with Django 3.1.2 and Channels 2.4.0 (installed from master on GitHub).

shreyas44 commented 3 years ago

@singlerider no problem! As for your problem, make sure it's path('graphql/', GraphqlSubscriptionConsumer) and not path('graphql/', GraphqlSubscriptionConsumer()). Also, could you try running it with Python 3.8 once cause I've been facing a lot of issues with 3.9 (not specific to Django or Django Subscriptions).

I don't have any public repository implementing this, unfortunately :(

singlerider commented 3 years ago

@shreyas44 No luck. I can't build your repo from git using pip. I'm going to move the conversation to your fork (https://github.com/shreyas44/graphene-subscriptions/issues/7) and update back here if I get this running.