mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-23 02:22:08 +03:00
update GraphQLTestCase.query docstring and remove type check
This commit is contained in:
parent
cb2cf513c0
commit
e8233964f0
|
@ -32,7 +32,11 @@ class GraphQLTestCase(TestCase):
|
|||
supply the op_name. For annon queries ("{ ... }"),
|
||||
should be None (default).
|
||||
input_data (dict) - If provided, the $input variable in GraphQL will be set
|
||||
to this value
|
||||
to this value. If both ``input_data`` and ``variables``,
|
||||
are provided, the ``input`` field in the ``variables``
|
||||
dict will be overwritten with this value.
|
||||
variables (dict) - If provided, the "variables" field in GraphQL will be
|
||||
set to this value.
|
||||
|
||||
Returns:
|
||||
Response object from client
|
||||
|
@ -43,7 +47,7 @@ class GraphQLTestCase(TestCase):
|
|||
if variables:
|
||||
body["variables"] = variables
|
||||
if input_data:
|
||||
if variables in body and isinstance(body, dict):
|
||||
if variables in body:
|
||||
body["variables"]["input"] = input_data
|
||||
else:
|
||||
body["variables"] = {"input": input_data}
|
||||
|
|
Loading…
Reference in New Issue
Block a user