-
-
Notifications
You must be signed in to change notification settings - Fork 559
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
Add support for type[strawberry.UNSET]
#3765
Add support for type[strawberry.UNSET]
#3765
Conversation
Reviewer's Guide by SourceryThis pull request introduces support for Class diagram showing Point2D input type changesclassDiagram
class Point2D {
+float x
+float y
+Optional[str] | type[strawberry.UNSET] label
}
note for Point2D "Updated to support type[strawberry.UNSET]"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @alexey-pelykh - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Thanks for adding the Here's a preview of the changelog: This release adds support for @strawberry.type
class User:
name: str | None = UNSET
age: int | None | type[strawberry.UNSET] = UNSET Here's the tweet text:
|
Hi, thanks for contributing to Strawberry 🍓! We noticed that this PR is missing a So as soon as this PR is merged, a release will be made 🚀. Here's an example of Release type: patch
Description of the changes, ideally with some examples, if adding a new feature. Release type can be one of patch, minor or major. We use semver, so make sure to pick the appropriate type. If in doubt feel free to ask :) Here's the tweet text:
|
19a8a30
to
f8ab2de
Compare
f8ab2de
to
07429d6
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3765 +/- ##
=======================================
Coverage 97.24% 97.24%
=======================================
Files 503 503
Lines 33561 33568 +7
Branches 1717 1717
=======================================
+ Hits 32635 32642 +7
Misses 707 707
Partials 219 219 |
CodSpeed Performance ReportMerging #3765 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Asking review from @patrick91 as well, just to get a second opinion
@patrick91 what do you think? :) |
type[strawberry.UNSET]
See #3791 which basically removes the need of using UNSET directly. |
@nrbnlulu I think it makes sense to merge both :D |
Description
Support for
type[strawberry.UNSET]
in addition tostrawberry.types.unset.UnsetType
Types of Changes
Issues Fixed or Closed by This PR
Checklist
Summary by Sourcery
Add support for
type[strawberry.UNSET]
in annotations, expanding the ways to specify optional fields.New Features:
type[strawberry.UNSET]
to indicate optional fields in type annotations.Tests:
type[strawberry.UNSET]
.