Skip to content

Commit 24c7eb7

Browse files
committed
Revert stricter parseValue coercion for Float
1 parent 64a9204 commit 24c7eb7

3 files changed

Lines changed: 0 additions & 8 deletions

File tree

src/main/java/graphql/scalar/GraphqlFloatCoercing.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ private Double serialiseImpl(Object input, @NotNull Locale locale) {
6565

6666
@NotNull
6767
private Double parseValueImpl(@NotNull Object input, @NotNull Locale locale) {
68-
if (!(input instanceof Number)) {
69-
throw new CoercingParseValueException(
70-
i18nMsg(locale, "Float.unexpectedRawValueType", typeName(input))
71-
);
72-
}
73-
7468
Double result = convertImpl(input);
7569
if (result == null) {
7670
throw new CoercingParseValueException(

src/main/resources/i18n/Scalars.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ ID.unexpectedAstType=Expected an AST type of ''IntValue'' or ''StringValue'' but
2424
#
2525
Float.notFloat=Expected a value that can be converted to type ''Float'' but it was a ''{0}''
2626
Float.unexpectedAstType=Expected an AST type of ''IntValue'' or ''FloatValue'' but it was a ''{0}''
27-
Float.unexpectedRawValueType=Expected a Number input, but it was a ''{0}''
2827
#
2928
Boolean.notBoolean=Expected a value that can be converted to type ''Boolean'' but it was a ''{0}''
3029
Boolean.unexpectedAstType=Expected an AST type of ''BooleanValue'' but it was a ''{0}''

src/main/resources/i18n/Scalars_de.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ ID.unexpectedAstType=Erwartet wurde ein AST type von ''IntValue'' oder ''StringV
2424
#
2525
Float.notFloat=Erwartet wurde ein Wert, der in den Typ ''Float'' konvertiert werden kann, aber es war ein ''{0}''
2626
Float.unexpectedAstType=Erwartet wurde ein AST type von ''IntValue'' oder ''FloatValue'', aber es war ein ''{0}''
27-
Float.unexpectedRawValueType=Erwartet wurde eine Number-Eingabe, aber es war ein ''{0}''
2827
#
2928
Boolean.notBoolean=Erwartet wurde ein Wert, der in den Typ ''Boolean'' konvertiert werden kann, aber es war ein ''{0}''
3029
Boolean.unexpectedAstType=Erwartet wurde ein AST type ''BooleanValue'', aber es war ein ''{0}''

0 commit comments

Comments
 (0)