-
-
Notifications
You must be signed in to change notification settings - Fork 676
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
Fix transforming and validating nested inputs and arrays #462
Conversation
Codecov Report
@@ Coverage Diff @@
## master #462 +/- ##
==========================================
+ Coverage 94.74% 95.03% +0.28%
==========================================
Files 74 75 +1
Lines 1238 1310 +72
Branches 234 247 +13
==========================================
+ Hits 1173 1245 +72
Misses 62 62
Partials 3 3
Continue to review full report at Codecov.
|
@MichalLytek looks like familiar code! :P haha but looks great. I'll get to playing with it soon. I moved forward with a lot of internal development and was going to add validation at some point later. Thanks for this. |
@j Soooo have you checked the changes? Does it work with edge use cases? 😄 |
@MichalLytek woops, I wrote that on my phone and thought it was merged. I'll test this now. |
@MichalLytek based on our current code-base where we use inheritance on the root level of an input and nested inputs, I was able to confirm that validation works and all inputs are mapped correctly. I toyed with doing deep nested with inheritance and those were converted properly as well. Thanks for this! |
@MichalLytek one thing I just saw, and I'm not sure if this is a bug or not. If you have a nullable input, it's creating the object with undefined fields. |
Extra info: The below mutation has a nullable input, in this case, I left it out and errors happen. mutation createCart {
createCart {
...
}
}
|
Thanks for the report, @j! That's the use cases I was thinking of 😄 I've checked the nullable fields but they are handled by
It's still the same case like with the |
032b97b
to
430918d
Compare
@MichalLytek yup, that ended up fixing the error! 💪 |
@j Thanks for confirmation! Merging 👀 |
Closes #133 🔒