Skip to content

fix: use execution_context_class attribute for GraphQLView #1398

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions graphene_django/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,19 @@ def __init__(
if middleware is None:
middleware = graphene_settings.MIDDLEWARE

self.schema = self.schema or schema
self.schema = schema or self.schema
if middleware is not None:
if isinstance(middleware, MiddlewareManager):
self.middleware = middleware
else:
self.middleware = list(instantiate_middleware(middleware))
self.root_value = root_value
self.pretty = self.pretty or pretty
self.graphiql = self.graphiql or graphiql
self.batch = self.batch or batch
self.execution_context_class = execution_context_class
self.pretty = pretty or self.pretty
self.graphiql = graphiql or self.graphiql
self.batch = batch or self.batch
self.execution_context_class = (
execution_context_class or self.execution_context_class
)
if subscription_path is None:
self.subscription_path = graphene_settings.SUBSCRIPTION_PATH

Expand Down