mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-29 04:53:43 +03:00
use actual root/variables/context args of the execute method (#878)
This commit is contained in:
parent
235096362f
commit
aeb04d5b5c
|
@ -180,7 +180,7 @@ def test_filter_shortcut_filterset_context():
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
schema = Schema(query=Query)
|
schema = Schema(query=Query)
|
||||||
result = schema.execute(query, context=context())
|
result = schema.execute(query, context_value=context())
|
||||||
assert not result.errors
|
assert not result.errors
|
||||||
|
|
||||||
assert len(result.data["contextArticles"]["edges"]) == 1
|
assert len(result.data["contextArticles"]["edges"]) == 1
|
||||||
|
|
|
@ -229,7 +229,7 @@ class ModelFormMutationTests(TestCase):
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""",
|
""",
|
||||||
variables={"pk": pet.pk},
|
variable_values={"pk": pet.pk},
|
||||||
)
|
)
|
||||||
|
|
||||||
self.assertIs(result.errors, None)
|
self.assertIs(result.errors, None)
|
||||||
|
|
|
@ -274,10 +274,10 @@ class GraphQLView(View):
|
||||||
extra_options["executor"] = self.executor
|
extra_options["executor"] = self.executor
|
||||||
|
|
||||||
return document.execute(
|
return document.execute(
|
||||||
root=self.get_root_value(request),
|
root_value=self.get_root_value(request),
|
||||||
variables=variables,
|
variable_values=variables,
|
||||||
operation_name=operation_name,
|
operation_name=operation_name,
|
||||||
context=self.get_context(request),
|
context_value=self.get_context(request),
|
||||||
middleware=self.get_middleware(request),
|
middleware=self.get_middleware(request),
|
||||||
**extra_options
|
**extra_options
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user