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
feat: .nonNull / .nullable chaining, additional cleanup #655
Conversation
This reverts commit 5e2e471.
@@ -1,5 +1,5 @@ | |||
--- | |||
title: list / nonNull / nullable | |||
title: list / nonNull |
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.
Since we default to nonNullDefault: false
, I wanted to avoid advertising nullable
in the top-level API. It's a bit of an antipattern.
Codecov Report
@@ Coverage Diff @@
## develop #655 +/- ##
===========================================
+ Coverage 93.84% 94.19% +0.34%
===========================================
Files 42 44 +2
Lines 2744 2806 +62
Branches 629 648 +19
===========================================
+ Hits 2575 2643 +68
+ Misses 167 161 -6
Partials 2 2 |
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.
Great job, LGTM 👍
…s#655) - Fixes SDL conversion - Defer wrapping until types are built - Supports GraphQL types anywhere that a type can be used, wrapped, etc. - Split out the wrapping, w/ `finalizeWrapping` helper which adds in the `NonNull` to the list as needed - Make `nonNull(nonNull(T))` & `nullable(nullable(T))` no-op for simplicity - Change: `nullable(nonNull(T))` will undo the `nonNull` - Properly type-check's `subscriptionType` by passing `Event` generic properly - Adds `declarativeWrappingPlugin` for previous `nullable` / `list` behavior Co-authored-by: Flavian DESVERNE <flavian.desverne@epitech.eu>
…s#655) - Fixes SDL conversion - Defer wrapping until types are built - Supports GraphQL types anywhere that a type can be used, wrapped, etc. - Split out the wrapping, w/ `finalizeWrapping` helper which adds in the `NonNull` to the list as needed - Make `nonNull(nonNull(T))` & `nullable(nullable(T))` no-op for simplicity - Change: `nullable(nonNull(T))` will undo the `nonNull` - Properly type-check's `subscriptionType` by passing `Event` generic properly - Adds `declarativeWrappingPlugin` for previous `nullable` / `list` behavior Co-authored-by: Flavian DESVERNE <flavian.desverne@epitech.eu>
finalizeWrapping
helper which adds in theNonNull
to the list as needednonNull(nonNull(T))
&nullable(nullable(T))
no-op for simplicitynullable(nonNull(T))
will undo thenonNull
subscriptionType
by passingEvent
generic properlydeclarativeWrappingPlugin
for previousnullable
/list
behavior