public class FunctionDataFetcher
Simple DataFetcher that invokes target function on the given object.
Constructor and Description |
---|
FunctionDataFetcher(java.lang.Object target,
kotlin.reflect.KFunction<?> fn,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
DataFetcherExecutionPredicate executionPredicate)
Simple DataFetcher that invokes target function on the given object.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(graphql.schema.DataFetchingEnvironment environment) |
public FunctionDataFetcher(java.lang.Object target, kotlin.reflect.KFunction<?> fn, com.fasterxml.jackson.databind.ObjectMapper objectMapper, DataFetcherExecutionPredicate executionPredicate)
Simple DataFetcher that invokes target function on the given object.
target
- The target object that performs the data fetching, if not specified then this data fetcher will attemptto use source object from the environmentfn
- The Kotlin function being invokedobjectMapper
- Jackson ObjectMapper that will be used to deserialize environment arguments to the expected function argumentsexecutionPredicate
- Predicate to run to map the value to a new resulttarget
- The target object that performs the data fetching, if not specified then this data fetcher will attempt
to use source object from the environmentfn
- The Kotlin function being invokedobjectMapper
- Jackson ObjectMapper that will be used to deserialize environment arguments to the expected function argumentsexecutionPredicate
- Predicate to run to map the value to a new result