Avatar for the strawberry-graphql user
strawberry-graphql
strawberry
BlogDocsChangelog

Performance History

Latest Results

fix for #4507 (#4508) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Arthur Bayr <arthur.bayr@sdox.io> Co-authored-by: Patrick Arminio <patrick.arminio@gmail.com>
main
3 days ago
Merge branch 'main' into fix-4507
Speedy1991:fix-4507
3 days ago
Bump autopub
main
3 days ago
Add generic exception handlers Shortcake-Parent: main
2026-06-28-add-generic-exception-handlers
3 days ago
Add generic exception handlers Shortcake-Parent: main
2026-06-28-add-generic-exception-handlers
3 days ago
Address code review of exception handlers Fixes the issues found in the pre-merge review of the exception-handlers feature (mapping Python exceptions to typed GraphQL union results). Correctness: - Return an awaitable handled result on async fields so async field extensions (e.g. async PermissionExtension) can await it instead of crashing with "object ... can't be used in 'await' expression". - Make the argument-conversion-error path safe for arg-consuming extensions: field extensions (e.g. permission checks) run with the raw argument values, so a matching handler can convert the error instead of it surfacing as an unrelated crash. - Match a concrete generic error_type (e.g. Error[int]) against the matching union member by resolving it through StrawberryAnnotation, instead of silently collapsing to the bare generic and never matching. - Route basic fields (no resolver) through handling when a handler applies, so an unrelated extension no longer flips whether errors are converted. - Skip all exception-handling machinery when no handler applies to a field (fast path), so existing schemas keep the resolver's original Task/Future and pay no overhead. API surface: - Move federation Schema's exception_handlers after federation_version so a positional version argument can't land in it. - Make strawberry.ExceptionHandler a @runtime_checkable Protocol. - Declare exception_handlers on the BaseSchema protocol. - Rename the internal excepthook alias to ExcepthookHandler and the new type_comparison helper to _resolve_object_definition to avoid colliding with public names. Cleanup: - Pre-compute applicable handlers per field once at schema build, removing per-request rescans and the double handler scan. - Convert arguments once, guarded by a single try/except, instead of branching on whether the field has handlers. - Rely on type hints for handler configuration rather than validating it at runtime, matching the rest of the codebase. Also adds regression tests and benchmarks, documents that generic error types must be referenced by their concrete instantiation, and notes that subscriptions are not covered.
2026-06-28-add-generic-exception-handlers
3 days ago

Latest Branches

CodSpeed Performance Gauge
0%
fix for #4507#4508
3 days ago
2f16991
Speedy1991:fix-4507
CodSpeed Performance Gauge
0%
deps(python)(deps): bump pip from 26.1 to 26.1.2#4514
3 days ago
48eef55
dependabot/uv/pip-26.1.2
CodSpeed Performance Gauge
0%
13 days ago
799c41e
2026-06-28-add-generic-exception-handlers
© 2026 CodSpeed Technology
Home Terms Privacy Docs