class GropiusFunctionDataFetcher(val target: Any?, val function: KFunction<*>, applicationContext: ApplicationContext) : SpringDataFetcher
FunctionDataFetcher which handles files parameter mapping for parameters of GraphQL type JSON correctly Allows input classes to have lateinit properties which are correctly deserialized. Also handles wrapping the result of a mutation when using AutoPayloadType Extends SpringDataFetcher
Parameters
target
if present, the object on which the function is invoked
function
the function the data fetcher calls
applicationContext
used to obtain Spring beans
Functions
Link copied to clipboard
protected open fun getParameters(fn: KFunction<*>, environment: DataFetchingEnvironment): Map<KParameter, Any?>
Link copied to clipboard
Handles the AutoPayloadType annotation if present
Link copied to clipboard
protected open override fun mapParameterToValue(param: KParameter, environment: DataFetchingEnvironment): Pair<KParameter, Any?>?
Link copied to clipboard
Link copied to clipboard
Invokes the mutation function and handles transient exceptions
Link copied to clipboard
private fun runMutationFunctionWithRetries(environment: DataFetchingEnvironment): CompletableFuture<Any?>
Invokes the mutation function and handles transient exceptions
Link copied to clipboard
protected open fun runSuspendingFunction(environment: DataFetchingEnvironment, parameterValues: Map<KParameter, Any?>): CompletableFuture<Any?>