FETCHED_DATA_TYPE - the fetched data typepublic abstract class GQLAbstractDataFetcher<FETCHED_DATA_TYPE> extends Object implements graphql.schema.DataFetcher<FETCHED_DATA_TYPE>
| Constructor and Description |
|---|
GQLAbstractDataFetcher() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,Object> |
convertObjectValue(graphql.language.ObjectValue objectValue,
Map<String,Object> arguments)
Convert GQL object value to a
Map |
protected Map<String,Object> |
getArgumentsForContext(Map<String,Object> arguments,
String argumentContext)
Get arguments with given property name within parent's arguments map
|
protected List<Map<String,Object>> |
getArgumentsForContextAsList(Map<String,Object> arguments,
String argumentContext)
Get arguments with given property name within parent's arguments map as a
List |
protected Object |
getArgumentValue(graphql.language.Field queryField,
String name,
Map<String,Object> arguments)
Get argument by name within given query field
|
protected GQLSchemaConfig |
getConfig() |
protected Class<?> |
getEntityClassByEntityName(String entityName)
Get entity class by its name
|
protected String |
getEntityName(String prefix,
String queryName)
Get entity by name
|
protected GQLInternalMetaModel |
getMetaModel() |
protected Collection<String> |
getRequestProvidedVariableNames()
Get provided variable names for the request
|
protected <T> T |
mapValue(graphql.language.Argument argument,
Map<String,Object> arguments)
Map GQL argument value to an object
|
protected <T> T |
mapValue(graphql.language.ObjectField field,
Map<String,Object> arguments)
Map GQL object field value to an object
|
void |
setMetaModel(GQLInternalMetaModel metaModel) |
void |
setSchemaConfig(GQLSchemaConfig schemaConfig) |
protected Collection<String> getRequestProvidedVariableNames()
Collection of variable namesprotected Class<?> getEntityClassByEntityName(String entityName)
entityName - the entity class nameprotected String getEntityName(String prefix, String queryName)
prefix - the entity prefixqueryName - the query nameprotected Map<String,Object> getArgumentsForContext(Map<String,Object> arguments, String argumentContext)
arguments - the parent's arguments mapargumentContext - the argument context nameMap (may be empty)protected List<Map<String,Object>> getArgumentsForContextAsList(Map<String,Object> arguments, String argumentContext)
Listprotected <T> T mapValue(graphql.language.ObjectField field,
Map<String,Object> arguments)
T - the mapped object typefield - the GQL ObjectFieldarguments - the map of query arguments for potential replacementsprotected <T> T mapValue(graphql.language.Argument argument,
Map<String,Object> arguments)
T - the mapped object typeargument - the GQL Argumentarguments - the map of query arguments for potential replacementsprotected Map<String,Object> convertObjectValue(graphql.language.ObjectValue objectValue, Map<String,Object> arguments)
MapobjectValue - the ObjectValuearguments - the Map of argumentsprotected Object getArgumentValue(graphql.language.Field queryField, String name, Map<String,Object> arguments)
queryField - the query Fieldname - then argument namearguments - the Map of argumentsprotected GQLInternalMetaModel getMetaModel()
protected GQLSchemaConfig getConfig()
public void setMetaModel(GQLInternalMetaModel metaModel)
metaModel - the metaModel to setpublic void setSchemaConfig(GQLSchemaConfig schemaConfig)
schemaConfig - the schemaConfig to setCopyright © 2019. All rights reserved.