- java.lang.Object
-
- io.helidon.graphql.server.GraphQlSupport.Builder
-
- All Implemented Interfaces:
Builder<GraphQlSupport>
,Supplier<GraphQlSupport>
- Enclosing class:
- GraphQlSupport
public static class GraphQlSupport.Builder extends Object implements Builder<GraphQlSupport>
Fluent API builder to createGraphQlSupport
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphQlSupport
build()
Build the instance from this builder.GraphQlSupport.Builder
config(Config config)
Update builder from configuration.GraphQlSupport.Builder
crossOriginConfig(CrossOriginConfig crossOriginConfig)
Set the CORS config from the specifiedCrossOriginConfig
object.GraphQlSupport.Builder
executor(ExecutorService executor)
Executor service to use for GraphQL processing.GraphQlSupport.Builder
executor(Supplier<? extends ExecutorService> executor)
Executor service to use for GraphQL processing.GraphQlSupport.Builder
invocationHandler(InvocationHandler handler)
InvocationHandler to execute GraphQl requests.GraphQlSupport.Builder
invocationHandler(Supplier<InvocationHandler> handler)
InvocationHandler to execute GraphQl requests.GraphQlSupport.Builder
schemaUri(String uri)
Configure URI that will serve the GraphQL schema under the context root.GraphQlSupport.Builder
webContext(String path)
Set a new root context for REST API of graphQL.
-
-
-
Method Detail
-
build
public GraphQlSupport build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<GraphQlSupport>
- Returns:
- instance of the built type
-
config
public GraphQlSupport.Builder 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 GraphQlSupport.Builder invocationHandler(InvocationHandler handler)
InvocationHandler to execute GraphQl requests.- Parameters:
handler
- handler to use- Returns:
- updated builder instance
-
invocationHandler
public GraphQlSupport.Builder invocationHandler(Supplier<InvocationHandler> handler)
InvocationHandler to execute GraphQl requests.- Parameters:
handler
- handler to use- Returns:
- updated builder instance
-
webContext
public GraphQlSupport.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 GraphQlSupport.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 GraphQlSupport.Builder crossOriginConfig(CrossOriginConfig crossOriginConfig)
Set the CORS config from the specifiedCrossOriginConfig
object.- Parameters:
crossOriginConfig
-CrossOriginConfig
containing CORS set-up- Returns:
- updated builder instance
-
executor
public GraphQlSupport.Builder executor(ExecutorService executor)
Executor service to use for GraphQL processing.- Parameters:
executor
- executor service- Returns:
- updated builder instance
-
executor
public GraphQlSupport.Builder executor(Supplier<? extends ExecutorService> executor)
Executor service to use for GraphQL processing.- Parameters:
executor
- executor service- Returns:
- updated builder instance
-
-