-
-
Notifications
You must be signed in to change notification settings - Fork 533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for nullable Connection #3703
Comments
@sourcery-ai plan |
Objectives
Setup commands
File changes
Verify commands
This plan was automatically generated. |
@sourcery-ai develop |
sourcery-ai bot
added a commit
that referenced
this issue
Nov 20, 2024
Enable nullable Connection types in the connection field decorator by updating type checking logic and adding validation for inner types. Update documentation and add tests to ensure compatibility with permission extensions and different nullable syntax. New Features: - Support nullable Connection types in the connection field decorator in strawberry.relay.fields. Enhancements: - Update type checking logic to handle Optional[Connection[T]] and Connection[T] | None annotations. Documentation: - Update documentation to reflect that connection fields can now be nullable. Tests: - Add tests to verify nullable connection fields work correctly with permission extensions and both Optional[Connection[T]] and Connection[T] | None syntax. Resolves #3703
This was referenced Nov 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The field using
strawberry.connection
should be able to be nullable.Feature Request Type
Description
This is needed in case if connection field would return an error e.g. from
PermissionExtension
and we don't want to error out the whole query.Right now when the field has a declared type of
strawberry.relay.ListConnection[...] | None
the following error is thrownUpvote & Fund
The text was updated successfully, but these errors were encountered: