Class AbstractAsyncDataFetcher<K,​T>

  • All Implemented Interfaces:
    graphql.schema.DataFetcher<T>, io.smallrye.graphql.execution.datafetcher.PlugableDataFetcher<K,​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>
    • 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​(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