io.vertx.ext.web.handler.graphql

## Interface GraphQLHandler

- All Superinterfaces:
    Handler<RoutingContext>

      public interface GraphQLHandler
      extends Handler<RoutingContext>

  A `Route` handler for GraphQL requests.
  Author:
    Thomas Segismont

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `GraphQLHandler` | `beforeExecute(Handler<ExecutionInputBuilderWithContext<RoutingContext>> config)` Set a callback to invoke before executing a GraphQL query.
    `static GraphQLHandler` | `create(graphql.GraphQL graphQL)` Create a new `GraphQLHandler` that will use the provided `graphQL` object to execute queries.
    `static GraphQLHandler` | `create(graphql.GraphQL graphQL, GraphQLHandlerOptions options)` Create a new `GraphQLHandler` that will use the provided `graphQL` object to execute queries.
    `GraphQLHandler` | `dataLoaderRegistry(java.util.function.Function<RoutingContext,org.dataloader.DataLoaderRegistry> factory)` Deprecated. as of 4.2, use `beforeExecute(Handler)` instead
    `static RoutingContext` | `getRoutingContext(graphql.GraphQLContext graphQlContext)` Retrieves the `RoutingContext` from the `GraphQLContext`.
    `GraphQLHandler` | `locale(java.util.function.Function<RoutingContext,Locale> factory)` Deprecated. as of 4.2, use `beforeExecute(Handler)` instead
    `GraphQLHandler` | `queryContext(java.util.function.Function<RoutingContext,Object> factory)` Deprecated. as of 4.2, use `beforeExecute(Handler)` instead

    - ### Methods inherited from interface io.vertx.core.Handler

      `handle`

- - ### Method Detail

    - #### create

          static GraphQLHandler create(graphql.GraphQL graphQL)

      Create a new `GraphQLHandler` that will use the provided `graphQL` object to execute queries.

      The handler will be configured with default `options`.

    - #### create

          static GraphQLHandler create(graphql.GraphQL graphQL,
                                       GraphQLHandlerOptions options)

      Create a new `GraphQLHandler` that will use the provided `graphQL` object to execute queries.

      The handler will be configured with the given `options`.

      Parameters:
        `options` - options for configuring the `GraphQLHandler`

    - #### getRoutingContext

          static RoutingContext getRoutingContext(graphql.GraphQLContext graphQlContext)

      Retrieves the `RoutingContext` from the `GraphQLContext`.
      Parameters:
        `graphQlContext` - the GraphQL context object
      Returns:
        the `RoutingContext`

    - #### queryContext

          @Deprecated
          GraphQLHandler queryContext(java.util.function.Function<RoutingContext,Object> factory)

      Deprecated. as of 4.2, use `beforeExecute(Handler)` instead
      Customize the query context object. The provided `factory` method will be invoked for each incoming GraphQL request.
      Returns:
        a reference to this, so the API can be used fluently

    - #### dataLoaderRegistry

          @Deprecated
          GraphQLHandler dataLoaderRegistry(java.util.function.Function<RoutingContext,org.dataloader.DataLoaderRegistry> factory)

      Deprecated. as of 4.2, use `beforeExecute(Handler)` instead
      Customize the `DataLoaderRegistry`. The provided `factory` method will be invoked for each incoming GraphQL request.
      Returns:
        a reference to this, so the API can be used fluently

    - #### locale

          @Deprecated
          GraphQLHandler locale(java.util.function.Function<RoutingContext,Locale> factory)

      Deprecated. as of 4.2, use `beforeExecute(Handler)` instead
      Customize the `Locale` passed to the GraphQL execution engine. The provided `factory` method will be invoked for each incoming GraphQL request.
      Returns:
        a reference to this, so the API can be used fluently

    - #### beforeExecute

          GraphQLHandler beforeExecute(Handler<ExecutionInputBuilderWithContext<RoutingContext>> config)

      Set a callback to invoke before executing a GraphQL query.
      Parameters:
        `config` - the callback to invoke
      Returns:
        a reference to this, so the API can be used fluently

Copyright © 2023 Eclipse. All rights reserved.