Strawberry GraphQL @ 0.288.3
Released
Fixed a bug where strawberry.Maybe[T] was incorrectly accepting null values when passed through variables
Previously, Maybe[T] returned a validation error for literal null values in GraphQL queries, but allowed null when passed via variables, resulting in Some(None) reaching the resolver instead of raising a validation error.
This fix ensures consistent validation behavior for Maybe[T] regardless of how the input is provided:
-
Maybe[T]now returns a validation error fornullin both literal queries and variables -
Maybe[T | None]continues to acceptnullvalues as expected - Error message indicates to use
Maybe[T | None]if null values are needed
Releases contributed by @bellini666 via #4096