Skip to content

Commit f2bd902

Browse files
authored
Merge pull request #5358 from rmosolgo/scalar-validation-remove-infinity-handling
Scalar validation: remove redundant infinity handling
2 parents 2644974 + 6a6161f commit f2bd902

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/graphql/schema/scalar.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,7 @@ def validate_non_null_input(value, ctx, max_errors: nil)
5050
end
5151

5252
if coerced_result.nil?
53-
str_value = if value == Float::INFINITY
54-
""
55-
else
56-
" #{GraphQL::Language.serialize(value)}"
57-
end
58-
Query::InputValidationResult.from_problem("Could not coerce value#{str_value} to #{graphql_name}")
53+
Query::InputValidationResult.from_problem("Could not coerce value #{GraphQL::Language.serialize(value)} to #{graphql_name}")
5954
elsif coerced_result.is_a?(GraphQL::CoercionError)
6055
Query::InputValidationResult.from_problem(coerced_result.message, message: coerced_result.message, extensions: coerced_result.extensions)
6156
else

0 commit comments

Comments
 (0)