question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow_subscriptions argument is not supported by class GraphQLView

See original GitHub issue

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: https://github.com/graphql-python/graphene-django/blob/670437d756c6919f06348903fbe7007652fcd126/graphene_django/views.py#L67 https://github.com/graphql-python/graphene-django/blob/master/graphene_django/views.py#L270

Thank you for your help

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:6

github_iconTop GitHub Comments

2reactions
mlugowskacommented, Feb 12, 2018

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

1reaction
prokhercommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow_subscriptions argument is not supported by class ...
hello, I'm not able to implement subscriptions. I get some error: Subscriptions are not allowed. You will need to either use the subscribe ......
Read more >
ObjectType - Graphene-Python
Each ObjectType is a Python class that inherits from graphene. ... If you define an argument for a field that is not required...
Read more >
Django + Graphene: From REST to GraphQL - FullStack Labs
This walk-through demonstrates the power of using Graphene with Django by covering the basics, testing, and more advanced features.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found