ResolverFor

Annotation used to mark generated resolver base classes in the Java API.

This is the Java equivalent of Kotlin's @ResolverFor annotation. It indicates which GraphQL type and field this resolver base class corresponds to.

Code generators will apply this annotation to generated abstract base classes. Tenant developers then extend these bases and annotate their concrete implementations with .

Example generated code:


= "Query", fieldName = "user", isSelective = false)
public abstract class QueryUserResolverBase
    implements FieldResolverBase<User, Query, QueryUserArguments, UserSelections> {
  // Generated methods
}

Tenant implementation:



public class QueryUserResolver extends QueryUserResolverBase {
  
  public CompletableFuture<User> resolve(Context ctx) {
    // Implementation
  }
}

Functions

Link copied to clipboard
abstract fun fieldName(): String
The GraphQL field name being resolved.
Link copied to clipboard
abstract fun isBatching(): Boolean
Whether the resolver handles resolution in batch mode.
Link copied to clipboard
abstract fun isSelective(): Boolean
Whether the resolver varies its result based on the requested selection set.
Link copied to clipboard
abstract fun typeName(): String
The GraphQL type name that contains the field being resolved.