public class PropertiesMapScalarAdapter extends io.leangen.graphql.generator.mapping.common.CachingMapper<graphql.schema.GraphQLScalarType,graphql.schema.GraphQLScalarType> implements io.leangen.graphql.generator.mapping.OutputConverter<PropertiesMap,Map<String,?>>
PropertiesMap from/to a scalar.
This is necessary because of the Object values in the Properties. Allowing SPQR to 'ignore' the content of the PropertiesList and pass it through verbatim as JSON matches the intend of PropertiesList/Map which is a catch all for 'stuff' we don't.
Based on SPQR's from ObjectScalarAdapter
| Constructor and Description |
|---|
PropertiesMapScalarAdapter() |
| Modifier and Type | Method and Description |
|---|---|
Map<String,?> |
convertOutput(PropertiesMap original,
AnnotatedType type,
io.leangen.graphql.execution.ResolutionEnvironment resolutionEnvironment) |
boolean |
supports(AnnotatedType type) |
protected graphql.schema.GraphQLScalarType |
toGraphQLInputType(String typeName,
AnnotatedType javaType,
io.leangen.graphql.generator.OperationMapper operationMapper,
io.leangen.graphql.generator.BuildContext buildContext) |
protected graphql.schema.GraphQLScalarType |
toGraphQLType(String typeName,
AnnotatedType javaType,
io.leangen.graphql.generator.OperationMapper operationMapper,
io.leangen.graphql.generator.BuildContext buildContext) |
public Map<String,?> convertOutput(PropertiesMap original, AnnotatedType type, io.leangen.graphql.execution.ResolutionEnvironment resolutionEnvironment)
convertOutput in interface io.leangen.graphql.generator.mapping.OutputConverter<PropertiesMap,Map<String,?>>public boolean supports(AnnotatedType type)
supports in interface io.leangen.graphql.generator.mapping.OutputConverter<PropertiesMap,Map<String,?>>supports in interface io.leangen.graphql.generator.mapping.TypeMapperprotected graphql.schema.GraphQLScalarType toGraphQLType(String typeName, AnnotatedType javaType, io.leangen.graphql.generator.OperationMapper operationMapper, io.leangen.graphql.generator.BuildContext buildContext)
toGraphQLType in class io.leangen.graphql.generator.mapping.common.CachingMapper<graphql.schema.GraphQLScalarType,graphql.schema.GraphQLScalarType>protected graphql.schema.GraphQLScalarType toGraphQLInputType(String typeName, AnnotatedType javaType, io.leangen.graphql.generator.OperationMapper operationMapper, io.leangen.graphql.generator.BuildContext buildContext)
toGraphQLInputType in class io.leangen.graphql.generator.mapping.common.CachingMapper<graphql.schema.GraphQLScalarType,graphql.schema.GraphQLScalarType>Copyright © 2017–2018 Committed. All rights reserved.