We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Schema.execute
1 parent 49a7b15 commit 77a588aCopy full SHA for 77a588a
graphene/contrib/django/views.py
@@ -2,9 +2,15 @@
2
3
4
class GraphQLView(BaseGraphQLView):
5
+ graphene_schema = None
6
+
7
def __init__(self, schema, **kwargs):
8
super(GraphQLView, self).__init__(
9
+ graphene_schema=schema,
10
schema=schema.schema,
11
executor=schema.executor,
12
**kwargs
13
)
14
15
+ def get_root_value(self, request):
16
+ return self.graphene_schema.query(super(GraphQLView, self).get_root_value(request))
tests/contrib_django/test_urls.py
@@ -23,8 +23,7 @@ class Human(DjangoNode):
23
class Meta:
24
model = Article
25
26
- @staticmethod
27
- def resolve_raises(*args):
+ def resolve_raises(self, *args):
28
raise Exception("This field should raise exception")
29
30
def get_node(self, id):
0 commit comments