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 String |
getEntityName(String prefix,
String queryName)
Get entity by name
|
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
|
protected Collection<String> getRequestProvidedVariableNames()
Collection of variable namesprotected String getEntityName(String prefix, String queryName)
prefix - the entity prefixqueryName - the query nameprotected <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> 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 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 argumentsCopyright © 2019. All rights reserved.