Skip to content

Commit f6ec068

Browse files
authored
Fix documentation references: op_name -> operation_name (#1312)
1 parent 0bb9f1c commit f6ec068

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Diff for: docs/testing.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Usage:
2727
}
2828
}
2929
''',
30-
op_name='myModel'
30+
operation_name='myModel'
3131
)
3232
3333
content = json.loads(response.content)
@@ -48,7 +48,7 @@ Usage:
4848
}
4949
}
5050
''',
51-
op_name='myModel',
51+
operation_name='myModel',
5252
variables={'id': 1}
5353
)
5454
@@ -72,7 +72,7 @@ Usage:
7272
}
7373
}
7474
''',
75-
op_name='myMutation',
75+
operation_name='myMutation',
7676
input_data={'my_field': 'foo', 'other_field': 'bar'}
7777
)
7878
@@ -107,7 +107,7 @@ Usage:
107107
}
108108
}
109109
''',
110-
op_name='myMutation',
110+
operation_name='myMutation',
111111
input_data={'my_field': 'foo', 'other_field': 'bar'}
112112
)
113113
@@ -147,7 +147,7 @@ To use pytest define a simple fixture using the query helper below
147147
}
148148
}
149149
''',
150-
op_name='myModel'
150+
operation_name='myModel'
151151
)
152152
153153
content = json.loads(response.content)

Diff for: graphene_django/utils/testing.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def graphql_query(
1919
Args:
2020
query (string) - GraphQL query to run
2121
operation_name (string) - If the query is a mutation or named query, you must
22-
supply the op_name. For annon queries ("{ ... }"),
22+
supply the operation_name. For annon queries ("{ ... }"),
2323
should be None (default).
2424
input_data (dict) - If provided, the $input variable in GraphQL will be set
2525
to this value. If both ``input_data`` and ``variables``,
@@ -78,7 +78,7 @@ def query(
7878
Args:
7979
query (string) - GraphQL query to run
8080
operation_name (string) - If the query is a mutation or named query, you must
81-
supply the op_name. For annon queries ("{ ... }"),
81+
supply the operation_name. For annon queries ("{ ... }"),
8282
should be None (default).
8383
input_data (dict) - If provided, the $input variable in GraphQL will be set
8484
to this value. If both ``input_data`` and ``variables``,
@@ -89,7 +89,7 @@ def query(
8989
headers (dict) - If provided, the headers in POST request to GRAPHQL_URL
9090
will be set to this value. Keys should be prepended with
9191
"HTTP_" (e.g. to specify the "Authorization" HTTP header,
92-
use "HTTP_AUTHORIZATION" as the key).
92+
use "HTTP_AUTHORIZATION" as the key).
9393
9494
Returns:
9595
Response object from client

0 commit comments

Comments
 (0)