-
Notifications
You must be signed in to change notification settings - Fork 527
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
Feature/did you mean input objects #902
Feature/did you mean input objects #902
Conversation
…stions for inputs
…est for name suggestions
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.
This is fantastic thank you! I've got a minor note which you may want to create a test case around to validate that it is actually necessary.
@@ -79,7 +79,14 @@ defmodule Absinthe.Phase.Document.Validation.ArgumentsOfCorrectType do | |||
node.fields | |||
|> Enum.flat_map(fn | |||
%{flags: %{invalid: _}, schema_node: nil} = child -> | |||
[unknown_field_error_message(child.name)] | |||
field_suggestions = | |||
case node.schema_node do |
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.
You should Type.unwrap(node.schema_node)
because this could be wrapped in non_null
.
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.
Used this line as example, should I change this one also? It's not related with the new feature!
…d add test case to non-null suggestion
Thank you! |
It address #314.
The steps to make things happen are:
Utils
module, so both input and objects can use the same implementation.I've based the tests on current ones, feel free to request new tests where necessary to avoid any regressions.
I also have no sure about the
Utils
module inside/validation
dir is a good pattern, since each module inside/validation
maps directly to a step, I've created this newUtils
thing to differentiate it.Suggestions are always welcome! : )