public class GQLCustomMethodDataFetcher extends GQLAbstractDataFetcher<Object>
GQLSchemaBuilder for buildSchema custom method data fetcher
argument| Constructor and Description |
|---|
GQLCustomMethodDataFetcher() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
convertValue(Map<String,Object> argumentPropertyValues,
GQLCustomMethodArg argument)
Convert given argument property values map to an actual argument object
of the expected argument type
|
Object |
get(graphql.schema.DataFetchingEnvironment environment) |
protected <T> T |
getArgumentValue(graphql.schema.DataFetchingEnvironment environment,
GQLCustomMethodArg argument)
Get argument value from given environment
|
com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
void |
registerCustomMethods(List<? extends GQLCustomMethod> customMethods)
Register custom methods in this data fetcher.
|
void |
setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
convertObjectValue, getArgumentsForContext, getArgumentsForContextAsList, getArgumentValue, getConfig, getEntityClassByEntityName, getEntityName, getMetaModel, getRequestProvidedVariableNames, mapValue, mapValue, setMetaModel, setSchemaConfigpublic void registerCustomMethods(List<? extends GQLCustomMethod> customMethods)
customMethods - a List of GQLCustomMethodpublic Object get(graphql.schema.DataFetchingEnvironment environment) throws Exception
Exceptionprotected <T> T getArgumentValue(graphql.schema.DataFetchingEnvironment environment,
GQLCustomMethodArg argument)
T - the argument typeenvironment - the DataFetchingEnvironmentargument - the GQLCustomMethodArgprotected Object convertValue(Map<String,Object> argumentPropertyValues, GQLCustomMethodArg argument)
argumentPropertyValues - a Map of property values to set in argument objectargument - the GQLCustomMethodArgpublic com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
objectMapper - the objectMapper to setCopyright © 2019. All rights reserved.