io.vertx.ext.web.handler.graphql

## Interface ApolloWSHandler

- All Superinterfaces:
    Handler<RoutingContext>

      public interface ApolloWSHandler
      extends Handler<RoutingContext>

  A handler for GraphQL requests sent over Apollo's `subscriptions-transport-ws` transport.
  Author:
    Rogelio Orts

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `ApolloWSHandler` | `connectionHandler(Handler<ServerWebSocket> connectionHandler)` Customize the connection `Handler`.
    `static ApolloWSHandler` | `create(graphql.GraphQL graphQL)` Create a new `ApolloWSHandler` that will use the provided `graphQL` object to execute requests.
    `static ApolloWSHandler` | `create(graphql.GraphQL graphQL, ApolloWSOptions options)` Create a new `ApolloWSHandler` that will use the provided `graphQL` object to execute requests.
    `ApolloWSHandler` | `dataLoaderRegistry(java.util.function.Function<ApolloWSMessage,org.dataloader.DataLoaderRegistry> factory)` Customize the `DataLoaderRegistry`.
    `ApolloWSHandler` | `endHandler(Handler<ServerWebSocket> endHandler)` Customize the end `Handler`.
    `ApolloWSHandler` | `locale(java.util.function.Function<ApolloWSMessage,Locale> factory)` Customize the `Locale` passed to the GraphQL execution engine.
    `ApolloWSHandler` | `messageHandler(Handler<ApolloWSMessage> messageHandler)` Customize the message `Handler`.
    `ApolloWSHandler` | `queryContext(java.util.function.Function<ApolloWSMessage,Object> factory)` Customize the query context object.

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

      `handle`

- - ### Method Detail

    - #### create

          static ApolloWSHandler create(graphql.GraphQL graphQL)

      Create a new `ApolloWSHandler` that will use the provided `graphQL` object to execute requests.

      The handler will be configured with the default `ApolloWSOptions`.

    - #### create

          static ApolloWSHandler create(graphql.GraphQL graphQL,
                                        ApolloWSOptions options)

      Create a new `ApolloWSHandler` that will use the provided `graphQL` object to execute requests.

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

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

    - #### connectionHandler

          ApolloWSHandler connectionHandler(Handler<ServerWebSocket> connectionHandler)

      Customize the connection `Handler`. This handler will be called at the beginning of each websocket connection.
      Returns:
        a reference to this, so the API can be used fluently

    - #### messageHandler

          ApolloWSHandler messageHandler(Handler<ApolloWSMessage> messageHandler)

      Customize the message `Handler`. This handler will be called for each `ApolloWSMessage` received.
      Returns:
        a reference to this, so the API can be used fluently

    - #### endHandler

          ApolloWSHandler endHandler(Handler<ServerWebSocket> endHandler)

      Customize the end `Handler`. This handler will be called at the end of each websocket connection.
      Returns:
        a reference to this, so the API can be used fluently

    - #### queryContext

          ApolloWSHandler queryContext(java.util.function.Function<ApolloWSMessage,Object> factory)

      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

          ApolloWSHandler dataLoaderRegistry(java.util.function.Function<ApolloWSMessage,org.dataloader.DataLoaderRegistry> factory)

      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

          ApolloWSHandler locale(java.util.function.Function<ApolloWSMessage,Locale> factory)

      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

Copyright © 2021 Eclipse. All rights reserved.