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

GraphQLSchema does not expect kwarg 'subscription' #41

Closed
adamcharnock opened this issue Nov 20, 2015 · 3 comments
Closed

GraphQLSchema does not expect kwarg 'subscription' #41

adamcharnock opened this issue Nov 20, 2015 · 3 comments

Comments

@adamcharnock
Copy link
Contributor

I suspect this is related to b91ae4b.

I am currently on version 3712542.

The exception was:

Traceback (most recent call last):
  File "/Users/adam/Envs/swiftwind/lib/python3.4/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/adam/Envs/swiftwind/lib/python3.4/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/Users/adam/Envs/swiftwind/lib/python3.4/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/adam/Envs/swiftwind/lib/python3.4/site-packages/django/views/generic/base.py", line 65, in view
    self = cls(**initkwargs)
  File "/Users/adam/Envs/swiftwind/src/graphene/graphene/contrib/django/views.py", line 10, in __init__
    schema=schema.schema,
  File "/Users/adam/Envs/swiftwind/src/graphene/graphene/core/schema.py", line 77, in schema
    subscription=self.T(self.subscription))
  File "/Users/adam/Envs/swiftwind/src/graphene/graphene/core/schema.py", line 21, in __init__
    super(GraphQLSchema, self).__init__(*args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'subscription'
@jhgg
Copy link
Member

jhgg commented Nov 20, 2015

Make sure that you have the latest graphql-core installed. Subscriptions were introduced to graphql-core in v0.4.9

@syrusakbary
Copy link
Member

Yep, installing latest version of graphql-core (0.4.9 - specified setup.py in graphene) should solve this.
Please reopen this issue if not.

@adamcharnock
Copy link
Contributor Author

Ah, I could swear I was using the latest version of both, but I've checked again this morning and it seems to be working fine. That's what I get for reporting issues at 2am I guess! :-)

ronachong pushed a commit to ronachong/graphene that referenced this issue Nov 3, 2017
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

3 participants