Interface WebGraphQlHandler.Builder

Enclosing interface:
WebGraphQlHandler

public static interface WebGraphQlHandler.Builder
Builder for a WebGraphQlHandler that executes a WebGraphQlInterceptor chain followed by a ExecutionGraphQlService.
  • Method Details

    • interceptor

      WebGraphQlHandler.Builder interceptor(WebGraphQlInterceptor... interceptors)
      Configure interceptors to be invoked before the target GraphQlService.

      One of the interceptors can be of type WebSocketGraphQlInterceptor to handle data from the first ConnectionInit message expected on a GraphQL over WebSocket session, as well as the Complete message expected at the end of a session.

      Parameters:
      interceptors - the interceptors to add
      Returns:
      this builder
    • interceptors

      Alternative to interceptor(WebGraphQlInterceptor...) with a List.
      Parameters:
      interceptors - the list of interceptors to add
      Returns:
      this builder
    • contextSnapshotFactory

      WebGraphQlHandler.Builder contextSnapshotFactory(io.micrometer.context.ContextSnapshotFactory snapshotFactory)
      Configure the ContextSnapshotFactory instance to use for context propagation of ThreadLocal, and Reactor context values from the transport layer to the GraphQL execution layer. If not set, then a default instance is used.
      Parameters:
      snapshotFactory - the factory to use
      Since:
      1.3.0
    • build

      Build the WebGraphQlHandler instance.
      Returns:
      the built WebGraphQlHandler