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

Allow_subscriptions argument is not supported by class GraphQLView #351

Closed
dionyself opened this issue Dec 23, 2017 · 6 comments
Closed

Comments

@dionyself
Copy link

hello,
I'm not able to implement subscriptions
I get some error: Subscriptions are not allowed. You will need to either use the subscribe function or pass allow_subscriptions=True
even i am doing that
url(r'^graphql', PrivateGraphQLView.as_view(graphiql=True, schema=tenant_schema, allow_subscriptions=True))

i'm using graphene_django 2.0
ref:

def __init__(self, schema=None, executor=None, middleware=None, root_value=None, graphiql=False, pretty=False,

https://github.com/graphql-python/graphene-django/blob/master/graphene_django/views.py#L270

Thank you for your help

@dionyself dionyself changed the title Allow_subscriptions argument in not supported by class GraphQLView Allow_subscriptions argument is not supported by class GraphQLView Dec 25, 2017
@mlugowska
Copy link

Hi,
I met the same error. Any news/updates?

@kavink
Copy link

kavink commented Mar 9, 2018

@syrusakbary @hballard thoughts on how I can work around this ? mainly trying to make flask work.

@LukeVideo
Copy link

I'm looking for a way to add allow_subscriptions=True, but i can't find any information about it anywhere.

@prokher
Copy link

prokher commented Sep 10, 2018

As far as I understand, GraphQLView implements Django's view for GraphQL, how do you expect it to enable subscriptions? I mean, it is rather difficult (well, impossible) to enable GraphQL subscriptions over plain HTTP (w/o tricks like long polling) cause to work with subscriptions you need some kind of sever-side events. That is exact reason we started implementing GraphQL over WebSockets. You can take a look here.

@LukeVideo
Copy link

Sorry @prokher I didn't manage to make your project work. I will try again later. I don't understand enough right now to work through the docs.

@dopeboy
Copy link

dopeboy commented May 13, 2019

We're marshaling resources for tighter integration with channels in #120 - I'd redirect you all there.

@dopeboy dopeboy closed this as completed May 13, 2019
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

No branches or pull requests

6 participants