mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-06-10 08:33:16 +03:00
Replace "operation_name" with "operationName"
This commit is contained in:
parent
a9886d4bb5
commit
1c7c3b8b2f
|
@ -32,20 +32,20 @@ class GraphQLTestCase(TestCase):
|
||||||
supply the op_name. For annon queries ("{ ... }"),
|
supply the op_name. For annon queries ("{ ... }"),
|
||||||
should be None (default).
|
should be None (default).
|
||||||
input_data (dict) - If provided, the $input variable in GraphQL will be set
|
input_data (dict) - If provided, the $input variable in GraphQL will be set
|
||||||
to this value. If both ``input_data`` and ``variables``,
|
to this value. If both ``input_data`` and ``variables``,
|
||||||
are provided, the ``input`` field in the ``variables``
|
are provided, the ``input`` field in the ``variables``
|
||||||
dict will be overwritten with this value.
|
dict will be overwritten with this value.
|
||||||
variables (dict) - If provided, the "variables" field in GraphQL will be
|
variables (dict) - If provided, the "variables" field in GraphQL will be
|
||||||
set to this value.
|
set to this value.
|
||||||
headers (dict) - If provided, the headers in POST request to GRAPHQL_URL
|
headers (dict) - If provided, the headers in POST request to GRAPHQL_URL
|
||||||
will be set to this value.
|
will be set to this value.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Response object from client
|
Response object from client
|
||||||
"""
|
"""
|
||||||
body = {"query": query}
|
body = {"query": query}
|
||||||
if op_name:
|
if op_name:
|
||||||
body["operation_name"] = op_name
|
body["operationName"] = op_name
|
||||||
if variables:
|
if variables:
|
||||||
body["variables"] = variables
|
body["variables"] = variables
|
||||||
if input_data:
|
if input_data:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user