public interface VertxDataFetcher<T> extends graphql.schema.DataFetcher<CompletionStage<T>>
DataFetcher
that works well with Vert.x callback and Future
based APIs.Modifier and Type | Method and Description |
---|---|
static <T> VertxDataFetcher<T> |
create(BiConsumer<graphql.schema.DataFetchingEnvironment,io.vertx.core.Promise<T>> dataFetcher)
Create a new data fetcher that works well with callback based APIs.
|
static <T> VertxDataFetcher<T> |
create(BiConsumer<graphql.schema.DataFetchingEnvironment,io.vertx.core.Promise<T>> dataFetcher,
Function<graphql.schema.DataFetchingEnvironment,io.vertx.core.Context> contextProvider)
Like
create(BiConsumer) , except the method uses the provided contextProvider instead of capturing the current one. |
static <T> VertxDataFetcher<T> |
create(Function<graphql.schema.DataFetchingEnvironment,io.vertx.core.Future<T>> dataFetcher)
Create a new data fetcher that works well with
Future based APIs. |
static <T> VertxDataFetcher<T> |
create(Function<graphql.schema.DataFetchingEnvironment,io.vertx.core.Future<T>> dataFetcher,
Function<graphql.schema.DataFetchingEnvironment,io.vertx.core.Context> contextProvider)
Like
create(Function) , except the method uses the provided contextProvider instead of capturing the current one. |
static <T> VertxDataFetcher<T> create(BiConsumer<graphql.schema.DataFetchingEnvironment,io.vertx.core.Promise<T>> dataFetcher)
The provided dataFetcher
will be invoked with the following arguments:
DataFetchingEnvironment
Promise
that the implementor must complete after the data objects are fetchedstatic <T> VertxDataFetcher<T> create(BiConsumer<graphql.schema.DataFetchingEnvironment,io.vertx.core.Promise<T>> dataFetcher, Function<graphql.schema.DataFetchingEnvironment,io.vertx.core.Context> contextProvider)
create(BiConsumer)
, except the method uses the provided contextProvider
instead of capturing the current one.static <T> VertxDataFetcher<T> create(Function<graphql.schema.DataFetchingEnvironment,io.vertx.core.Future<T>> dataFetcher)
Future
based APIs.
The provided dataFetcher
will be invoked with the following argument:
DataFetchingEnvironment
static <T> VertxDataFetcher<T> create(Function<graphql.schema.DataFetchingEnvironment,io.vertx.core.Future<T>> dataFetcher, Function<graphql.schema.DataFetchingEnvironment,io.vertx.core.Context> contextProvider)
create(Function)
, except the method uses the provided contextProvider
instead of capturing the current one.Copyright © 2022 Eclipse. All rights reserved.