use actual root/variables/context args of the execute method (#878)

This commit is contained in:
Sergey Fursov 2020-02-23 12:50:40 +03:00 committed by GitHub
parent 235096362f
commit aeb04d5b5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -180,7 +180,7 @@ def test_filter_shortcut_filterset_context():
}
"""
schema = Schema(query=Query)
result = schema.execute(query, context=context())
result = schema.execute(query, context_value=context())
assert not result.errors
assert len(result.data["contextArticles"]["edges"]) == 1

View File

@ -229,7 +229,7 @@ class ModelFormMutationTests(TestCase):
}
}
""",
variables={"pk": pet.pk},
variable_values={"pk": pet.pk},
)
self.assertIs(result.errors, None)

View File

@ -274,10 +274,10 @@ class GraphQLView(View):
extra_options["executor"] = self.executor
return document.execute(
root=self.get_root_value(request),
variables=variables,
root_value=self.get_root_value(request),
variable_values=variables,
operation_name=operation_name,
context=self.get_context(request),
context_value=self.get_context(request),
middleware=self.get_middleware(request),
**extra_options
)