Skip to content

Commit 388ca41

Browse files
authored
fix: use execution_context_class attribute for GraphQLView (#1398)
* fix: use execution_context_class attribute for GraphQLView
1 parent 72a3700 commit 388ca41

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

graphene_django/views.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,19 @@ def __init__(
105105
if middleware is None:
106106
middleware = graphene_settings.MIDDLEWARE
107107

108-
self.schema = self.schema or schema
108+
self.schema = schema or self.schema
109109
if middleware is not None:
110110
if isinstance(middleware, MiddlewareManager):
111111
self.middleware = middleware
112112
else:
113113
self.middleware = list(instantiate_middleware(middleware))
114114
self.root_value = root_value
115-
self.pretty = self.pretty or pretty
116-
self.graphiql = self.graphiql or graphiql
117-
self.batch = self.batch or batch
118-
self.execution_context_class = execution_context_class
115+
self.pretty = pretty or self.pretty
116+
self.graphiql = graphiql or self.graphiql
117+
self.batch = batch or self.batch
118+
self.execution_context_class = (
119+
execution_context_class or self.execution_context_class
120+
)
119121
if subscription_path is None:
120122
self.subscription_path = graphene_settings.SUBSCRIPTION_PATH
121123

0 commit comments

Comments
 (0)