-
-
Notifications
You must be signed in to change notification settings - Fork 589
Add support for annotated when defining fields #3996
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis PR refactors how StrawberryField integrates with Python dataclasses by decoupling it from dataclasses.Field, introduces a dedicated StrawberryDataclassField wrapper with conversion logic, injects an automated conversion step for annotated fields in object types, and cleans up minor typings and utility functions. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
⚡️ Codeflash found optimizations for this PR📄 12% (0.12x) speedup for
|
6769f77
to
9d18518
Compare
Summary by Sourcery
Enable support for using Annotated to define GraphQL fields by decoupling StrawberryField from dataclasses.Field and converting them into real dataclass fields during type wrapping.
New Features:
Enhancements: