Class 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, operation, operationInvoker, type
    • Constructor Summary

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

      • AbstractAsyncDataFetcher

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

      • 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