Class GraphqlServiceBuilder
java.lang.Object
com.linecorp.armeria.server.graphql.GraphqlServiceBuilder
Constructs a
GraphqlService
to serve GraphQL within Armeria.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Creates aGraphqlService
.configureDataLoaderRegistry(Iterable<? extends Consumer<? super org.dataloader.DataLoaderRegistry>> configurers)
Adds theDataLoaderRegistry
consumers.configureDataLoaderRegistry(Consumer<org.dataloader.DataLoaderRegistry>... configurers)
Adds theDataLoaderRegistry
consumers.configureGraphql(GraphqlConfigurator... configurers)
Adds theGraphqlConfigurator
consumers.configureGraphql(Iterable<? extends GraphqlConfigurator> configurers)
Adds theGraphqlConfigurator
consumers.instrumentation(graphql.execution.instrumentation.Instrumentation... instrumentations)
Adds theInstrumentation
s.instrumentation(Iterable<? extends graphql.execution.instrumentation.Instrumentation> instrumentations)
Adds theInstrumentation
s.runtimeWiring(RuntimeWiringConfigurator... runtimeWiringConfigurators)
Adds theRuntimeWiringConfigurator
s.runtimeWiring(Iterable<? extends RuntimeWiringConfigurator> configurators)
Adds theRuntimeWiringConfigurator
s.schema(graphql.schema.GraphQLSchema schema)
Sets theGraphQLSchema
.schemaFile(File... schemaFiles)
Adds the schemaFile
s.schemaFile(Iterable<? extends File> schemaFiles)
Adds the schemaFile
s.schemaUrls(Iterable<String> schemaUrls)
Adds the schema loaded from the given URLs.schemaUrls(String... schemaUrls)
Adds the schema loaded from the given URLs.typeVisitors(graphql.schema.GraphQLTypeVisitor... typeVisitors)
Adds theGraphQLTypeVisitor
s.typeVisitors(Iterable<? extends graphql.schema.GraphQLTypeVisitor> typeVisitors)
Adds theGraphQLTypeVisitor
s.useBlockingTaskExecutor(boolean useBlockingTaskExecutor)
Sets whether the service executes service methods using the blocking executor.
-
Method Details
-
schemaFile
Adds the schemaFile
s. If not set, theschema.graphql
orschema.graphqls
will be imported from the resource. -
schemaFile
Adds the schemaFile
s. If not set, theschema.graphql
orschema.graphqls
will be imported from the resource. -
schemaUrls
Adds the schema loaded from the given URLs. If not set, theschema.graphql
orschema.graphqls
will be imported from the resource. -
schemaUrls
Adds the schema loaded from the given URLs. If not set, theschema.graphql
orschema.graphqls
will be imported from the resource. -
schema
Sets theGraphQLSchema
. -
configureDataLoaderRegistry
public GraphqlServiceBuilder configureDataLoaderRegistry(Consumer<org.dataloader.DataLoaderRegistry>... configurers)Adds theDataLoaderRegistry
consumers. -
configureDataLoaderRegistry
public GraphqlServiceBuilder configureDataLoaderRegistry(Iterable<? extends Consumer<? super org.dataloader.DataLoaderRegistry>> configurers)Adds theDataLoaderRegistry
consumers. -
runtimeWiring
public GraphqlServiceBuilder runtimeWiring(RuntimeWiringConfigurator... runtimeWiringConfigurators)Adds theRuntimeWiringConfigurator
s. -
runtimeWiring
public GraphqlServiceBuilder runtimeWiring(Iterable<? extends RuntimeWiringConfigurator> configurators)Adds theRuntimeWiringConfigurator
s. -
typeVisitors
Adds theGraphQLTypeVisitor
s. -
typeVisitors
public GraphqlServiceBuilder typeVisitors(Iterable<? extends graphql.schema.GraphQLTypeVisitor> typeVisitors)Adds theGraphQLTypeVisitor
s. -
instrumentation
public GraphqlServiceBuilder instrumentation(graphql.execution.instrumentation.Instrumentation... instrumentations)Adds theInstrumentation
s. -
instrumentation
public GraphqlServiceBuilder instrumentation(Iterable<? extends graphql.execution.instrumentation.Instrumentation> instrumentations)Adds theInstrumentation
s. -
configureGraphql
Adds theGraphqlConfigurator
consumers. -
configureGraphql
Adds theGraphqlConfigurator
consumers. -
useBlockingTaskExecutor
Sets whether the service executes service methods using the blocking executor. -
build
Creates aGraphqlService
.
-