Class ScalarResolver.CustomCoercing<JavaType,GraphQLType>
java.lang.Object
se.l4.graphql.binding.internal.resolvers.ScalarResolver.CustomCoercing<JavaType,GraphQLType>
- Type Parameters:
JavaType
-GraphQLType
-
- All Implemented Interfaces:
graphql.schema.Coercing<JavaType,GraphQLType>
- Enclosing class:
- ScalarResolver
public static class ScalarResolver.CustomCoercing<JavaType,GraphQLType> extends Object implements graphql.schema.Coercing<JavaType,GraphQLType>
Implementation of
Coercing
that delegates work to an instance
of GraphQLScalarConversion
.-
Constructor Summary
Constructors Constructor Description CustomCoercing(GraphQLScalarResolver<JavaType,GraphQLType> scalar, se.l4.commons.types.conversion.Conversion<Object,GraphQLType> inputConversion)
-
Method Summary
Modifier and Type Method Description Object
convertLiteral(Object input, Map<String,Object> variables)
JavaType
parseLiteral(Object input)
JavaType
parseLiteral(Object input, Map<String,Object> variables)
JavaType
parseValue(Object input)
GraphQLType
serialize(Object dataFetcherResult)
-
Constructor Details
-
CustomCoercing
public CustomCoercing(GraphQLScalarResolver<JavaType,GraphQLType> scalar, se.l4.commons.types.conversion.Conversion<Object,GraphQLType> inputConversion)
-
-
Method Details
-
serialize
public GraphQLType serialize(Object dataFetcherResult) throws graphql.schema.CoercingSerializeException- Specified by:
serialize
in interfacegraphql.schema.Coercing<JavaType,GraphQLType>
- Throws:
graphql.schema.CoercingSerializeException
-
parseValue
- Specified by:
parseValue
in interfacegraphql.schema.Coercing<JavaType,GraphQLType>
- Throws:
graphql.schema.CoercingParseValueException
-
parseLiteral
- Specified by:
parseLiteral
in interfacegraphql.schema.Coercing<JavaType,GraphQLType>
- Throws:
graphql.schema.CoercingParseLiteralException
-
parseLiteral
public JavaType parseLiteral(Object input, Map<String,Object> variables) throws graphql.schema.CoercingParseLiteralException- Specified by:
parseLiteral
in interfacegraphql.schema.Coercing<JavaType,GraphQLType>
- Throws:
graphql.schema.CoercingParseLiteralException
-
convertLiteral
public Object convertLiteral(Object input, Map<String,Object> variables) throws graphql.schema.CoercingParseLiteralException- Throws:
graphql.schema.CoercingParseLiteralException
-