graphene-django/graphene_django
Kuba Misiorny 3cf940d0c8
Add ability to pass execution_context_class to GraphQLView.as_view() (#1109)
* 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

* make black happy

removed whitespace
2021-03-31 10:31:20 -07:00
..
debug enhancement: DjangoDebugContext captures exceptions and allows captured stack traces to be queried (#1122) 2021-03-02 10:45:46 -08:00
filter Cleaned up unused imports and variables. (#1146) 2021-03-18 12:26:02 +03:00
forms Cleaned up unused imports and variables. (#1146) 2021-03-18 12:26:02 +03:00
management Fix schema dump on windows (#1123) 2021-02-22 20:20:59 -08:00
rest_framework WIP: Merge master into v3 (#1086) 2020-12-30 15:37:57 -08:00
static/graphene_django Fix subscriptions in JS (#1124) 2021-02-22 20:19:20 -08:00
templates/graphene Add headers support to GraphiQL (#1016) 2020-08-07 10:13:26 +01:00
tests Fix: Use resolver passed as an attribute (#1131) 2021-02-23 09:50:19 -08:00
utils Added GraphQLTransactionTestCase (#1099) 2021-02-22 20:24:02 -08:00
__init__.py WIP: Merge master into v3 (#1086) 2020-12-30 15:37:57 -08:00
compat.py Fix main branch tests failing due to wrong instancing of Missing class (#1135) 2021-03-02 10:46:35 -08:00
conftest.py Make tests order independent (#932) 2020-04-20 13:23:20 +01:00
constants.py WIP: Merge master into v3 (#1086) 2020-12-30 15:37:57 -08:00
converter.py Tox & actions updates (#1143) 2021-03-24 09:32:37 +03:00
fields.py Cleaned up unused imports and variables. (#1146) 2021-03-18 12:26:02 +03:00
registry.py Reformatted files using black 2018-07-19 16:52:24 -07:00
settings.py Tox & actions updates (#1143) 2021-03-24 09:32:37 +03:00
types.py Cleaned up unused imports and variables. (#1146) 2021-03-18 12:26:02 +03:00
views.py Add ability to pass execution_context_class to GraphQLView.as_view() (#1109) 2021-03-31 10:31:20 -07:00