io.vertx.ext.web.handler.graphql.schema

## Interface VertxDataFetcher<T>

- All Superinterfaces:
    graphql.schema.DataFetcher<CompletionStage<T>>

      public interface VertxDataFetcher<T>
      extends graphql.schema.DataFetcher<CompletionStage<T>>

  A `DataFetcher` that works well with Vert.x callback and `Future` based APIs.
  Author:
    Thomas Segismont

- - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> VertxDataFetcher<T>` | `create(java.util.function.BiConsumer<graphql.schema.DataFetchingEnvironment,Promise<T>> dataFetcher)` Create a new data fetcher that works well with callback based APIs.
    `static <T> VertxDataFetcher<T>` | `create(java.util.function.BiConsumer<graphql.schema.DataFetchingEnvironment,Promise<T>> dataFetcher, java.util.function.Function<graphql.schema.DataFetchingEnvironment,Context> contextProvider)` Like `create(BiConsumer)`, except the method uses the provided `contextProvider` instead of capturing the current one.
    `static <T> VertxDataFetcher<T>` | `create(java.util.function.Function<graphql.schema.DataFetchingEnvironment,Future<T>> dataFetcher)` Create a new data fetcher that works well with `Future` based APIs.
    `static <T> VertxDataFetcher<T>` | `create(java.util.function.Function<graphql.schema.DataFetchingEnvironment,Future<T>> dataFetcher, java.util.function.Function<graphql.schema.DataFetchingEnvironment,Context> contextProvider)` Like `create(Function)`, except the method uses the provided `contextProvider` instead of capturing the current one.

    - ### Methods inherited from interface graphql.schema.DataFetcher

      `get`

- - ### Method Detail

    - #### create

          static <T> VertxDataFetcher<T> create(java.util.function.BiConsumer<graphql.schema.DataFetchingEnvironment,Promise<T>> dataFetcher)

      Create a new data fetcher that works well with callback based APIs.

      The provided `dataFetcher` will be invoked with the following arguments:

      - the `DataFetchingEnvironment`
      - a `Promise` that the implementor must complete after the data objects are fetched

    - #### create

          static <T> VertxDataFetcher<T> create(java.util.function.BiConsumer<graphql.schema.DataFetchingEnvironment,Promise<T>> dataFetcher,
                                                java.util.function.Function<graphql.schema.DataFetchingEnvironment,Context> contextProvider)

      Like `create(BiConsumer)`, except the method uses the provided `contextProvider` instead of capturing the current one.

    - #### create

          static <T> VertxDataFetcher<T> create(java.util.function.Function<graphql.schema.DataFetchingEnvironment,Future<T>> dataFetcher)

      Create a new data fetcher that works well with `Future` based APIs.

      The provided `dataFetcher` will be invoked with the following argument:

      - the `DataFetchingEnvironment`

    - #### create

          static <T> VertxDataFetcher<T> create(java.util.function.Function<graphql.schema.DataFetchingEnvironment,Future<T>> dataFetcher,
                                                java.util.function.Function<graphql.schema.DataFetchingEnvironment,Context> contextProvider)

      Like `create(Function)`, except the method uses the provided `contextProvider` instead of capturing the current one.

Copyright © 2021 Eclipse. All rights reserved.