Class AbstractAsyncDataFetcher<K,T>

java.lang.Object
io.smallrye.graphql.execution.datafetcher.AbstractDataFetcher<K,T>
io.quarkus.smallrye.graphql.runtime.spi.datafetcher.AbstractAsyncDataFetcher<K,T>
All Implemented Interfaces:
graphql.schema.DataFetcher<T>, io.smallrye.graphql.execution.datafetcher.PlugableBatchableDataFetcher<K,T>, io.smallrye.graphql.execution.datafetcher.PlugableDataFetcher<T>, org.dataloader.BatchLoaderWithContext<K,T>
Direct Known Subclasses:
QuarkusCompletionStageDataFetcher, QuarkusUniDataFetcher

public abstract class AbstractAsyncDataFetcher<K,T> extends io.smallrye.graphql.execution.datafetcher.AbstractDataFetcher<K,T>
  • Field Summary

    Fields inherited from class io.smallrye.graphql.execution.datafetcher.AbstractDataFetcher

    argumentHelper, batchLoaderHelper, errorResultHelper, eventEmitter, fieldHelper, measurementIds, metricsEmitter, operation, operationInvoker, type
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractAsyncDataFetcher(io.smallrye.graphql.schema.model.Operation operation, io.smallrye.graphql.schema.model.Type type)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract io.smallrye.mutiny.Uni<List<T>>
    handleUserBatchLoad(graphql.schema.DataFetchingEnvironment dfe, Object[] arguments)
     
    protected abstract io.smallrye.mutiny.Uni<?>
    handleUserMethodCall(graphql.schema.DataFetchingEnvironment dfe, Object[] transformedArguments)
     
    protected <O> O
    invokeAndTransform(io.smallrye.graphql.api.Context c, graphql.schema.DataFetchingEnvironment dfe, graphql.execution.DataFetcherResult.Builder<Object> resultBuilder, Object[] transformedArguments)
     
    protected CompletionStage<List<T>>
    invokeBatch(graphql.schema.DataFetchingEnvironment dfe, Object[] arguments)
     
    protected <O> O
    invokeFailure(graphql.execution.DataFetcherResult.Builder<Object> resultBuilder)
     

    Methods inherited from class io.smallrye.graphql.execution.datafetcher.AbstractDataFetcher

    get, load

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractAsyncDataFetcher

      public AbstractAsyncDataFetcher(io.smallrye.graphql.schema.model.Operation operation, io.smallrye.graphql.schema.model.Type type)
  • Method Details

    • invokeAndTransform

      protected <O> O invokeAndTransform(io.smallrye.graphql.api.Context c, graphql.schema.DataFetchingEnvironment dfe, graphql.execution.DataFetcherResult.Builder<Object> resultBuilder, Object[] transformedArguments) throws Exception
      Specified by:
      invokeAndTransform in class io.smallrye.graphql.execution.datafetcher.AbstractDataFetcher<K,T>
      Throws:
      Exception
    • handleUserMethodCall

      protected abstract io.smallrye.mutiny.Uni<?> handleUserMethodCall(graphql.schema.DataFetchingEnvironment dfe, Object[] transformedArguments) throws Exception
      Throws:
      Exception
    • invokeFailure

      protected <O> O invokeFailure(graphql.execution.DataFetcherResult.Builder<Object> resultBuilder)
      Specified by:
      invokeFailure in class io.smallrye.graphql.execution.datafetcher.AbstractDataFetcher<K,T>
    • invokeBatch

      protected CompletionStage<List<T>> invokeBatch(graphql.schema.DataFetchingEnvironment dfe, Object[] arguments)
      Specified by:
      invokeBatch in class io.smallrye.graphql.execution.datafetcher.AbstractDataFetcher<K,T>
    • handleUserBatchLoad

      protected abstract io.smallrye.mutiny.Uni<List<T>> handleUserBatchLoad(graphql.schema.DataFetchingEnvironment dfe, Object[] arguments) throws Exception
      Throws:
      Exception