Constructor and Description |
---|
GraphqlFloatCoercing() |
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
parseLiteral(java.lang.Object input)
Called during query validation to convert a query input AST node into a Java object acceptable for the scalar type.
|
java.lang.Double |
parseValue(java.lang.Object input)
Called to resolve an input from a query variable into a Java object acceptable for the scalar type.
|
java.lang.Double |
serialize(java.lang.Object input)
Called to convert a Java object result of a DataFetcher to a valid runtime value for the scalar type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
parseLiteral
public java.lang.Double serialize(java.lang.Object input)
Coercing
Note : Throw CoercingSerializeException
if there is fundamental
problem during serialisation, don't return null to indicate failure.
Note : You should not allow RuntimeException
s to come out of your serialize method, but rather
catch them and fire them as CoercingSerializeException
instead as per the method contract.
public java.lang.Double parseValue(java.lang.Object input)
Coercing
Note : You should not allow RuntimeException
s to come out of your parseValue method, but rather
catch them and fire them as CoercingParseValueException
instead as per the method contract.
parseValue
in interface Coercing<java.lang.Double,java.lang.Double>
input
- is never nullpublic java.lang.Double parseLiteral(java.lang.Object input)
Coercing
Value
.
Note : You should not allow RuntimeException
s to come out of your parseLiteral method, but rather
catch them and fire them as CoercingParseLiteralException
instead as per the method contract.
parseLiteral
in interface Coercing<java.lang.Double,java.lang.Double>
input
- is never null