Skip to content

Commit b4b6255

Browse files
committed
Revert "Really gross fix for input name snake_ vs caMel"
This reverts commit af0c678.
1 parent 1e41dfe commit b4b6255

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/graphql/schema/input_object.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ def validate_non_null_input(input, ctx)
181181

182182
# Inject missing required arguments
183183
missing_required_inputs = self.arguments.reduce({}) do |m, (argument_name, argument)|
184-
ruby_arg_name = argument_name.split(/(?=[A-Z])/).map(&:downcase).join('_').to_sym
185-
if !(input.key?(argument_name) || input.key?(ruby_arg_name)) && argument.type.non_null? && warden.get_argument(self, argument_name)
184+
if !input.key?(argument_name) && argument.type.non_null? && warden.get_argument(self, argument_name)
186185
m[argument_name] = nil
187186
end
188187

@@ -192,7 +191,6 @@ def validate_non_null_input(input, ctx)
192191

193192
[input, missing_required_inputs].each do |args_to_validate|
194193
args_to_validate.each do |argument_name, value|
195-
argument_name = argument_name.to_s.split('_').map.with_index { |str, i| i == 0 ? str : str.capitalize }.join if argument_name.is_a?(Symbol)
196194
argument = warden.get_argument(self, argument_name)
197195
# Items in the input that are unexpected
198196
unless argument

0 commit comments

Comments
 (0)