io.vertx.ext.web.handler.graphql

## Class VertxDataFetcher<T>

- java.lang.Object
- - io.vertx.ext.web.handler.graphql.VertxDataFetcher<T>

- All Implemented Interfaces:
    graphql.schema.DataFetcher<CompletionStage<T>>

      public class VertxDataFetcher<T>
      extends Object
      implements graphql.schema.DataFetcher<CompletionStage<T>>

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `VertxDataFetcher(java.util.function.BiConsumer<graphql.schema.DataFetchingEnvironment,Promise<T>> dataFetcher)` Create a new data fetcher.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CompletionStage<T>` | `get(graphql.schema.DataFetchingEnvironment environment)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### VertxDataFetcher

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

      Create a new data fetcher. The provided function will be invoked with the following arguments:
      - the `DataFetchingEnvironment`
      - a future that the implementor must complete after the data objects are fetched

  - ### Method Detail

    - #### get

          public CompletionStage<T> get(graphql.schema.DataFetchingEnvironment environment)
                                 throws Exception

      Specified by:
        `get` in interface `graphql.schema.DataFetcher<CompletionStage<T>>`
      Throws:
        `Exception`

Copyright © 2021 Eclipse. All rights reserved.