graphql-python
graphql-core
BlogDocsChangelog

Fix AttributeError on exception with field `source`

#240Merged
Comparing
kimjh12:main
(
1f63309
) with
main
(
fa8f9b5
)
CodSpeed Performance Gauge
0%
Untouched
14

Benchmarks

Passed

test_execute_basic_async
tests/benchmarks/test_execution_async.py
CodSpeed Performance Gauge
+5%
3.1 ms2.9 ms
test_execute_basic_sync
tests/benchmarks/test_execution_sync.py
CodSpeed Performance Gauge
0%
2.8 ms2.8 ms
test_visit_all_ast_nodes
tests/benchmarks/test_visit.py
CodSpeed Performance Gauge
0%
209.3 ms208.6 ms
test_validate_introspection_query
tests/benchmarks/test_validate_gql.py
CodSpeed Performance Gauge
0%
15.4 ms15.4 ms
test_build_schema_from_introspection
tests/benchmarks/test_build_client_schema.py
CodSpeed Performance Gauge
0%
126.3 ms126 ms
test_recreate_a_graphql_schema
tests/benchmarks/test_graphql_schema.py
CodSpeed Performance Gauge
0%
13.3 ms13.3 ms
test_many_repeated_fields
tests/benchmarks/test_repeated_fields.py
CodSpeed Performance Gauge
0%
272.3 ms272 ms
test_validate_sdl_document
tests/benchmarks/test_validate_sdl.py
CodSpeed Performance Gauge
0%
447.8 ms447.5 ms
test_validate_invalid_query
tests/benchmarks/test_validate_invalid_gql.py
CodSpeed Performance Gauge
0%
186.9 ms186.9 ms
test_execute_introspection_query
tests/benchmarks/test_introspection_from_schema.py
CodSpeed Performance Gauge
0%
941.5 ms943 ms
test_execute_async_iterable_list_field
tests/benchmarks/test_async_iterable.py
CodSpeed Performance Gauge
0%
12 ms12.1 ms
test_visit_all_ast_nodes_in_parallel
tests/benchmarks/test_visit.py
CodSpeed Performance Gauge
0%
1.8 s1.8 s
test_build_schema_from_ast
tests/benchmarks/test_build_ast_schema.py
CodSpeed Performance Gauge
0%
109.4 ms109.9 ms
test_parse_kitchen_sink
tests/benchmarks/test_parser.py
CodSpeed Performance Gauge
-1%
7.1 ms7.2 ms

Commits

Click on a commit to change the comparison range
Base
main
fa8f9b5
+0.25%
Fix AttributeError on exception with field `source` trying to fix below error, which happens if the handler raises an custom exception with `source` field inside ``` locations: list[SourceLocation] | None = [ > source.get_location(pos) for pos in positions ^^^^^^^^^^^^^^^^^^^ ] E AttributeError: 'str' object has no attribute 'get_location' .tox/py312/lib/python3.12/site-packages/graphql/error/graphql_error.py:161: AttributeError ```
1f63309
2 months ago
by kimjh12
© 2025 CodSpeed Technology
Home Terms Privacy Docs