Skip to content

Commit

Permalink
Add missing filter call in complete_awaitable_value()
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Feb 17, 2024
1 parent 8f8102f commit 85c1285
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/graphql/execution/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,7 @@ async def complete_awaitable_value(
)
error = located_error(raw_error, field_nodes, path.as_list())
handle_field_error(error, return_type, errors)
self.filter_subsequent_payloads(path, async_payload_record)
completed = None
return completed

Expand Down
2 changes: 1 addition & 1 deletion tests/execution/test_subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ async def resolves_to_an_error_if_variables_were_wrong_type():
],
)

assert result.errors[0].original_error is None
assert result.errors[0].original_error


# Once a subscription returns a valid AsyncIterator, it can still yield errors.
Expand Down
8 changes: 3 additions & 5 deletions tests/execution/test_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
)


def faulty_parse_value(value: str) -> str:
def faulty_parse_value(_value: str) -> str:
raise TestFaultyScalarGraphQLError


def faulty_parse_literal(ast: ValueNode, _variables=None) -> str:
def faulty_parse_literal(_ast: ValueNode, _variables=None) -> str:
raise TestFaultyScalarGraphQLError


Expand Down Expand Up @@ -733,9 +733,7 @@ def reports_error_for_array_passed_into_string_input():
],
)

errors = result.errors
assert errors
assert errors[0].original_error
assert result.errors[0].original_error

def reports_error_for_non_provided_variables_for_non_nullable_inputs():
# Note: this test would typically fail validation before
Expand Down

0 comments on commit 85c1285

Please sign in to comment.