Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added GraphQL Playgrounds #25

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

shreyas44
Copy link

@shreyas44 shreyas44 commented Jul 1, 2020

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 :)

shreyas44 added 2 commits July 2, 2020 02:15
Created a view to get GraphQL Playground view
Changed the consumer to return errors only if there is an error
@jaydenwindle
Copy link
Owner

@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
Copy link
Author

shreyas44 commented Jul 2, 2020

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

@singlerider
Copy link

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
Copy link
Author

Hey @singlerider! You can check out the master branch in my fork where I've merged this branch as well as the branch in #28. The fork is not published to Pypi though, so you would have to download it and add it directly from the repo.

@singlerider
Copy link

@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
Copy link
Author

shreyas44 commented Oct 23, 2020

@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
Copy link

singlerider commented Oct 23, 2020

@shreyas44 No luck. I can't build your repo from git using pip. I'm going to move the conversation to your fork (shreyas44#7) and update back here if I get this running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add GraphiQL compatibility
3 participants