mutation

abstract fun <T> mutation(selections: String, variables: Map<String, Any>, targetClass: Class<T>): CompletableFuture<T>(source)

Deprecated

Use MutationFieldExecutionContext; other resolver kinds cannot execute mutations.

Executes a sub-mutation against the Mutation root type and returns the result as an instance of targetClass with the requested selections populated.

Return

a future that completes with the populated Mutation GRT instance

Parameters

selections

the GraphQL selection string (e.g., "incrementCounter")

variables

variables map for parameterized selections

targetClass

the Java GRT class to populate with the resolved data

<T>

the Java GRT type for the Mutation root


open fun <T> mutation(selections: String, targetClass: Class<T>): CompletableFuture<T>(source)

Deprecated

Executes a sub-mutation against the Mutation root type with no variables.


open fun <T> mutation(operation: MutationFromAnnotation, variables: Map<String, Any>, targetClass: Class<T>): CompletableFuture<T>(source)

Deprecated

Executes a mutation declared with @GraphQLOperation.

Generated resolver contexts provide overloads that infer targetClass from the tenant's Mutation GRT.


open fun <T> mutation(operation: MutationFromAnnotation, targetClass: Class<T>): CompletableFuture<T>(source)

Deprecated

Executes an annotated mutation with no variables.