strawberry-graphql
strawberry
BlogDocsChangelog

feat: use TypedDict for Python query codegen

#4089
Comparing
magicmark:query_codegen_using_typed_dicts
(
21c18bf
) with
main
(
c8d6ae4
)
CodSpeed Performance Gauge
0%
Untouched
31
Ignored
1

Benchmarks

Passed

test_execute_with_many_fields
tests/benchmarks/test_execute_sync.py
CodSpeed Performance Gauge
0%
37.7 ms37.5 ms
test_parse_large_query
tests/benchmarks/test_parse_execute_large_query.py
CodSpeed Performance Gauge
0%
585.3 ms584 ms
test_subscription_long_run[1000]
tests/benchmarks/test_subscriptions.py
CodSpeed Performance Gauge
0%
180.6 ms180.3 ms
test_subscription_long_run[20000]
tests/benchmarks/test_subscriptions.py
CodSpeed Performance Gauge
0%
3.5 s3.5 s
test_execute[with_simpleextension-items_1000]
tests/benchmarks/test_execute_with_extensions.py
CodSpeed Performance Gauge
0%
68 ms67.9 ms
test_execute_large_query[baseline]
tests/benchmarks/test_parse_execute_large_query.py
CodSpeed Performance Gauge
0%
2.2 s2.2 s
test_execute_with_1000_items
tests/benchmarks/test_execute_sync.py
CodSpeed Performance Gauge
0%
67.3 ms67.3 ms
test_execute_large_query[with_parser_cache]
tests/benchmarks/test_parse_execute_large_query.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s
test_execute_with_10_items
tests/benchmarks/test_execute_sync.py
CodSpeed Performance Gauge
0%
5.4 ms5.4 ms
test_execute[with_no_extensions-items_1000]
tests/benchmarks/test_execute_with_extensions.py
CodSpeed Performance Gauge
0%
67.7 ms67.7 ms
test_interface_performance[4096]
tests/benchmarks/test_execute.py
CodSpeed Performance Gauge
0%
68.6 ms68.6 ms
test_execute_generic_input
tests/benchmarks/test_generic_input.py
CodSpeed Performance Gauge
0%
498.6 ms498.6 ms
test_convert_argument_large_list[1048576]
tests/benchmarks/test_arguments.py
CodSpeed Performance Gauge
0%
9.4 ms9.4 ms
test_convert_argument_large_list[4194304]
tests/benchmarks/test_arguments.py
CodSpeed Performance Gauge
0%
37.5 ms37.5 ms
test_convert_argument_large_list[262144]
tests/benchmarks/test_arguments.py
CodSpeed Performance Gauge
0%
2.4 ms2.4 ms
test_convert_argument_large_list[65536]
tests/benchmarks/test_arguments.py
CodSpeed Performance Gauge
0%
634.8 µs635 µs
test_execute
tests/benchmarks/test_execute.py
CodSpeed Performance Gauge
0%
534 ms534.1 ms
test_execute[with_no_extensions-items_10000]
tests/benchmarks/test_execute_with_extensions.py
CodSpeed Performance Gauge
0%
630.9 ms631.1 ms
test_execute_with_100_items
tests/benchmarks/test_execute_sync.py
CodSpeed Performance Gauge
0%
10.9 ms10.9 ms
test_interface_performance[1]
tests/benchmarks/test_execute.py
CodSpeed Performance Gauge
0%
59.6 ms59.6 ms
test_execute_complex_schema[50]
tests/benchmarks/test_complex_schema.py
CodSpeed Performance Gauge
0%
4 s4 s
test_interface_performance[16]
tests/benchmarks/test_execute.py
CodSpeed Performance Gauge
0%
59.6 ms59.6 ms
test_stadium[seats_per_row_250]
tests/benchmarks/test_stadium.py
CodSpeed Performance Gauge
0%
6.6 s6.7 s
test_execute[with_simpleextension-items_10000]
tests/benchmarks/test_execute_with_extensions.py
CodSpeed Performance Gauge
0%
634.6 ms635.4 ms
test_stadium[seats_per_row_500]
tests/benchmarks/test_stadium.py
CodSpeed Performance Gauge
0%
13.3 s13.3 s
test_execute[with_resolveextension-items_10000]
tests/benchmarks/test_execute_with_extensions.py
CodSpeed Performance Gauge
0%
1.9 s1.9 s
test_execute[with_resolveextension-items_1000]
tests/benchmarks/test_execute_with_extensions.py
CodSpeed Performance Gauge
0%
185.4 ms185.8 ms
test_execute_with_many_fields_and_directives
tests/benchmarks/test_execute_sync.py
CodSpeed Performance Gauge
0%
43.2 ms43.3 ms
test_subscription
tests/benchmarks/test_subscriptions.py
CodSpeed Performance Gauge
0%
216.8 ms217.3 ms
test_interface_performance[256]
tests/benchmarks/test_execute.py
CodSpeed Performance Gauge
-1%
61.8 ms62.2 ms
test_convert_argument_large_list[16384]
tests/benchmarks/test_arguments.py
CodSpeed Performance Gauge
-1%
207.3 µs208.7 µs

Ignored

test_execute_basic
tests/benchmarks/test_execute_sync.py
Ignored
CodSpeed Performance Gauge
+3%
2.2 ms2.2 ms

Commits

Click on a commit to change the comparison range
Base
main
c8d6ae4
-0.05%
feat: use TypedDict for Python query codegen output Change the Python query codegen plugin to generate TypedDict classes instead of plain classes. This provides better type safety for dictionary-like access patterns commonly used when working with JSON responses from GraphQL APIs. Optional fields with default values now use NotRequired instead of the = value syntax (which TypedDict doesn't support). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
21c18bf
3 days ago
by magicmark
© 2026 CodSpeed Technology
Home Terms Privacy Docs