Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ApolloWSHandler

A handler for GraphQL requests sent over Apollo's subscriptions-transport-ws transport.

Hierarchy

  • ApolloWSHandler

Implements

  • any
  • any

Index

Methods

beforeExecute

connectionHandler

  • connectionHandler(connectionHandler: ((res: ServerWebSocket) => void) | Handler<ServerWebSocket>): ApolloWSHandler
  • Customize the connection . This handler will be called at the beginning of each websocket connection.

    Parameters

    • connectionHandler: ((res: ServerWebSocket) => void) | Handler<ServerWebSocket>

    Returns ApolloWSHandler

connectionInitHandler

dataLoaderRegistry

  • Customize the . The provided factory method will be invoked for each incoming GraphQL request.

    Parameters

    Returns ApolloWSHandler

endHandler

  • endHandler(endHandler: ((res: ServerWebSocket) => void) | Handler<ServerWebSocket>): ApolloWSHandler
  • Customize the end . This handler will be called at the end of each websocket connection.

    Parameters

    • endHandler: ((res: ServerWebSocket) => void) | Handler<ServerWebSocket>

    Returns ApolloWSHandler

handle

  • handle(arg0: RoutingContext): void
  • Parameters

    • arg0: RoutingContext

    Returns void

locale

  • Customize the passed to the GraphQL execution engine. The provided factory method will be invoked for each incoming GraphQL request.

    Parameters

    Returns ApolloWSHandler

messageHandler

queryContext

  • Customize the query context object. The provided factory method will be invoked for each incoming GraphQL request.

    Parameters

    Returns ApolloWSHandler

Static create

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

    The handler will be configured with the default ApolloWSOptions.

    Parameters

    Returns ApolloWSHandler

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

    The handler will be configured with the given options.

    Parameters

    Returns ApolloWSHandler

Static getMessage

  • Retrieves the ApolloWSMessage from the .

    Parameters

    • graphQlContext: any

    Returns ApolloWSMessage

Generated using TypeDoc