mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-11 08:42:32 +03:00
Add ability to pass execution_context_class
to GraphQLView.as_view()
Currently when passing `execution_context_class` like this: ``` GraphQLView.as_view(execution_context_class=CustomContext) ``` you get the following error from `View.as_view()` ``` TypeError: GraphQLView() received an invalid keyword 'execution_context_class'. as_view only accepts arguments that are already attributes of the class. ``` this PR fixes the `hasattr` check in `.as_view`. Fixes: #1072
This commit is contained in:
parent
c3404a9793
commit
30fa86084e
|
@ -84,7 +84,8 @@ class GraphQLView(View):
|
|||
pretty = False
|
||||
batch = False
|
||||
subscription_path = None
|
||||
|
||||
execution_context_class = None
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
schema=None,
|
||||
|
|
Loading…
Reference in New Issue
Block a user