Class GraphQlService.Builder

java.lang.Object
io.helidon.webserver.graphql.GraphQlService.Builder
All Implemented Interfaces:
io.helidon.common.Builder<GraphQlService.Builder,GraphQlService>, Supplier<GraphQlService>
Enclosing class:
GraphQlService

public static class GraphQlService.Builder extends Object implements io.helidon.common.Builder<GraphQlService.Builder,GraphQlService>
Fluent API builder to create GraphQlService.
  • Method Details

    • build

      public GraphQlService build()
      Specified by:
      build in interface io.helidon.common.Builder<GraphQlService.Builder,GraphQlService>
    • config

      public GraphQlService.Builder config(io.helidon.config.Config config)
      Update builder from configuration. Configuration options:
      Optional configuration parameters
      key default value description
      web-context "/graphql" Context that serves the GraphQL endpoint.
      schema-uri "/schema.graphql" URI that serves the schema (under web context)
      cors default CORS configuration see CrossOriginConfig.create(io.helidon.config.Config)
      executor-service default server thread pool configuration see ServerThreadPoolSupplier.builder()
      Parameters:
      config - configuration to use
      Returns:
      updated builder instance
    • invocationHandler

      public GraphQlService.Builder invocationHandler(InvocationHandler handler)
      InvocationHandler to execute GraphQl requests.
      Parameters:
      handler - handler to use
      Returns:
      updated builder instance
    • invocationHandler

      public GraphQlService.Builder invocationHandler(Supplier<InvocationHandler> handler)
      InvocationHandler to execute GraphQl requests.
      Parameters:
      handler - handler to use
      Returns:
      updated builder instance
    • webContext

      public GraphQlService.Builder webContext(String path)
      Set a new root context for REST API of graphQL.
      Parameters:
      path - context to use
      Returns:
      updated builder instance
    • schemaUri

      public GraphQlService.Builder schemaUri(String uri)
      Configure URI that will serve the GraphQL schema under the context root.
      Parameters:
      uri - URI of the schema
      Returns:
      updated builder instance
    • crossOriginConfig

      public GraphQlService.Builder crossOriginConfig(io.helidon.cors.CrossOriginConfig crossOriginConfig)
      Set the CORS config from the specified CrossOriginConfig object.
      Parameters:
      crossOriginConfig - CrossOriginConfig containing CORS set-up
      Returns:
      updated builder instance
    • executor

      public GraphQlService.Builder executor(ExecutorService executor)
      Executor service to use for GraphQL processing.
      Parameters:
      executor - executor service
      Returns:
      updated builder instance
    • executor

      public GraphQlService.Builder executor(Supplier<? extends ExecutorService> executor)
      Executor service to use for GraphQL processing.
      Parameters:
      executor - executor service
      Returns:
      updated builder instance