Class GraphQlService.Builder
- All Implemented Interfaces:
Builder<GraphQlService.Builder, GraphQlService>, Supplier<GraphQlService>
- Enclosing class:
GraphQlService
GraphQlService.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the instance from this builder.Update builder from configuration.declarativeHttpEntryPoints(HttpEntryPoint.EntryPoints entryPoints, ServiceDescriptor<?> descriptor, Set<Qualifier> typeQualifiers, List<Annotation> typeAnnotations) Configure HTTP entry point wrapping for a generated declarative GraphQL service.executor(ExecutorService executor) Deprecated, for removal: This API element is subject to removal in a future version.GraphQL request processing does not use a dedicated executorexecutor(Supplier<? extends ExecutorService> executor) Deprecated, for removal: This API element is subject to removal in a future version.GraphQL request processing does not use a dedicated executorhttpEntryPoints(HttpEntryPoint.EntryPoints entryPoints, ServiceDescriptor<?> descriptor, Set<Qualifier> typeQualifiers, List<Annotation> typeAnnotations) Configure HTTP entry point wrapping for this GraphQL service.invocationHandler(InvocationHandler handler) InvocationHandler to execute GraphQl requests.invocationHandler(Supplier<InvocationHandler> handler) InvocationHandler to execute GraphQl requests.permitAll(boolean permitAll) Whether to permit access without authentication.Configure URI that will serve the GraphQL schema under the context root.webContext(String path) Set a new root context for REST API of graphQL.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault GraphQlServiceget()default GraphQlService.Builderidentity()Instance of this builder as the correct type.default GraphQlService.Builderupdate(Consumer<GraphQlService.Builder> consumer) Update the builder in a fluent API way.
-
Method Details
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<GraphQlService.Builder, GraphQlService>- Returns:
- instance of the built type
-
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) permit-all falseWhether to permit access without authentication. - Parameters:
config- configuration to use- Returns:
- updated builder instance
-
invocationHandler
InvocationHandler to execute GraphQl requests.- Parameters:
handler- handler to use- Returns:
- updated builder instance
-
invocationHandler
InvocationHandler to execute GraphQl requests.- Parameters:
handler- handler to use- Returns:
- updated builder instance
-
httpEntryPoints
public GraphQlService.Builder httpEntryPoints(HttpEntryPoint.EntryPoints entryPoints, ServiceDescriptor<?> descriptor, Set<Qualifier> typeQualifiers, List<Annotation> typeAnnotations) Configure HTTP entry point wrapping for this GraphQL service.This is primarily used by generated declarative GraphQL features so request-level HTTP interceptors, such as WebServer security, can run before GraphQL request processing begins. Framework-owned schema and introspection requests use implicit authorization when the endpoint declares explicit authorization; application resolver entry points retain their declared authorization behavior.
- Parameters:
entryPoints- HTTP entry pointsdescriptor- descriptor of the declarative endpointtypeQualifiers- qualifiers of the declarative endpointtypeAnnotations- annotations of the declarative endpoint- Returns:
- updated builder instance
-
declarativeHttpEntryPoints
public GraphQlService.Builder declarativeHttpEntryPoints(HttpEntryPoint.EntryPoints entryPoints, ServiceDescriptor<?> descriptor, Set<Qualifier> typeQualifiers, List<Annotation> typeAnnotations) Configure HTTP entry point wrapping for a generated declarative GraphQL service.Unlike
httpEntryPoints(HttpEntryPoint.EntryPoints, ServiceDescriptor, Set, List), this method may complete explicit request authorization after GraphQL execution when no resolver was invoked. Generated declarative services guarantee that every application resolver records its invocation before application code executes, so this cannot defer authorization until after an untracked resolver runs.- Parameters:
entryPoints- HTTP entry pointsdescriptor- descriptor of the declarative endpointtypeQualifiers- qualifiers of the declarative endpointtypeAnnotations- annotations of the declarative endpoint- Returns:
- updated builder instance
-
webContext
Set a new root context for REST API of graphQL.- Parameters:
path- context to use- Returns:
- updated builder instance
-
schemaUri
Configure URI that will serve the GraphQL schema under the context root.- Parameters:
uri- URI of the schema- Returns:
- updated builder instance
-
permitAll
Whether to permit access without authentication. This applies to GET and POST requests to the GraphQL endpoint and to the schema endpoint.- Parameters:
permitAll- whether requests are permitted without authentication- Returns:
- updated builder instance
-
executor
@Deprecated(since="27.0.0", forRemoval=true) public GraphQlService.Builder executor(ExecutorService executor) Deprecated, for removal: This API element is subject to removal in a future version.GraphQL request processing does not use a dedicated executorExecutor service to use for GraphQL processing.- Parameters:
executor- executor service- Returns:
- updated builder instance
-
executor
@Deprecated(since="27.0.0", forRemoval=true) public GraphQlService.Builder executor(Supplier<? extends ExecutorService> executor) Deprecated, for removal: This API element is subject to removal in a future version.GraphQL request processing does not use a dedicated executorExecutor service to use for GraphQL processing.- Parameters:
executor- executor service- Returns:
- updated builder instance
-