-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Error Bubbling #2013
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
Error Bubbling #2013
Conversation
rmosolgo
left a comment
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.
Wow, this is great! I'm really impressed by the progress you made here, I've always been intimidated by this issue.
The behavior that you've added here is much better than the previous behavior, what do you think about making it the new default ?
lib/graphql/static_validation/rules/argument_literals_are_compatible.rb
Outdated
Show resolved
Hide resolved
lib/graphql/static_validation/rules/variable_default_values_are_correctly_typed.rb
Outdated
Show resolved
Hide resolved
i'm ok with it - seems like it would make sense to do that in 1.9 but 1.8 probably should keep the current behavior? i'm also in the unenviable position of having to support the old behavior on a per-user basis for the time being so maybe that's where my conservatism comes from. |
😅 Sure, we can switch the default in 1.9. |
|
also out of curiosity - would you be open to migrating to rspec? test::unit / minitest make it so hard to do basic things like "just run this single spec" |
|
Did you try |
that solved my problem, thanks. |
|
|
|
i just tested this out with my company code and it looks like there's something not quite right. will update when i've sorted it out. |
|
just figured it out - bubbling was never tested or fixed for the |
|
ok, looks good on my end now. |
|
👌 😎 Thanks again for your work here! It's such a long-needed improvement and it really required a big effort. Looks great. |
thanks! next time i'll squash first, i'm horrified to see my |
(this fixes #1020 and #1967) see also #160)
this pr adds a new schema option
error_bubbling. with this settrue(which is the default) the behavior is exactly the same as the current behavior, ie field errors bubble up to all theInputObject's that contain them.with
error_bubbling falsethis doesn't happen - we don't log static validation errors if the ast node that's invalid isn't the node we're visiting inArgumentLiteralsAreCompatible.update: i merged in my branch that fixes #1967 as well.