Skip to content

Fix documentation references: op_name -> operation_name #1312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Usage:
}
}
''',
op_name='myModel'
operation_name='myModel'
)

content = json.loads(response.content)
Expand All @@ -48,7 +48,7 @@ Usage:
}
}
''',
op_name='myModel',
operation_name='myModel',
variables={'id': 1}
)

Expand All @@ -72,7 +72,7 @@ Usage:
}
}
''',
op_name='myMutation',
operation_name='myMutation',
input_data={'my_field': 'foo', 'other_field': 'bar'}
)

Expand Down Expand Up @@ -107,7 +107,7 @@ Usage:
}
}
''',
op_name='myMutation',
operation_name='myMutation',
input_data={'my_field': 'foo', 'other_field': 'bar'}
)

Expand Down Expand Up @@ -147,7 +147,7 @@ To use pytest define a simple fixture using the query helper below
}
}
''',
op_name='myModel'
operation_name='myModel'
)

content = json.loads(response.content)
Expand Down
6 changes: 3 additions & 3 deletions graphene_django/utils/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def graphql_query(
Args:
query (string) - GraphQL query to run
operation_name (string) - If the query is a mutation or named query, you must
supply the op_name. For annon queries ("{ ... }"),
supply the operation_name. For annon queries ("{ ... }"),
should be None (default).
input_data (dict) - If provided, the $input variable in GraphQL will be set
to this value. If both ``input_data`` and ``variables``,
Expand Down Expand Up @@ -78,7 +78,7 @@ def query(
Args:
query (string) - GraphQL query to run
operation_name (string) - If the query is a mutation or named query, you must
supply the op_name. For annon queries ("{ ... }"),
supply the operation_name. For annon queries ("{ ... }"),
should be None (default).
input_data (dict) - If provided, the $input variable in GraphQL will be set
to this value. If both ``input_data`` and ``variables``,
Expand All @@ -89,7 +89,7 @@ def query(
headers (dict) - If provided, the headers in POST request to GRAPHQL_URL
will be set to this value. Keys should be prepended with
"HTTP_" (e.g. to specify the "Authorization" HTTP header,
use "HTTP_AUTHORIZATION" as the key).
use "HTTP_AUTHORIZATION" as the key).

Returns:
Response object from client
Expand Down