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 theDataLoaderRegistryconsumers.configureDataLoaderRegistry(Consumer<org.dataloader.DataLoaderRegistry>... configurers) Adds theDataLoaderRegistryconsumers.configureGraphql(GraphqlConfigurator... configurers) Adds theGraphqlConfiguratorconsumers.configureGraphql(Iterable<? extends GraphqlConfigurator> configurers) Adds theGraphqlConfiguratorconsumers.instrumentation(graphql.execution.instrumentation.Instrumentation... instrumentations) Adds theInstrumentations.instrumentation(Iterable<? extends graphql.execution.instrumentation.Instrumentation> instrumentations) Adds theInstrumentations.runtimeWiring(RuntimeWiringConfigurator... runtimeWiringConfigurators) Adds theRuntimeWiringConfigurators.runtimeWiring(Iterable<? extends RuntimeWiringConfigurator> configurators) Adds theRuntimeWiringConfigurators.schema(graphql.schema.GraphQLSchema schema) Sets theGraphQLSchema.schemaFile(File... schemaFiles) Adds the schemaFiles.schemaFile(Iterable<? extends File> schemaFiles) Adds the schemaFiles.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 theGraphQLTypeVisitors.typeVisitors(Iterable<? extends graphql.schema.GraphQLTypeVisitor> typeVisitors) Adds theGraphQLTypeVisitors.useBlockingTaskExecutor(boolean useBlockingTaskExecutor) Sets whether the service executes service methods using the blocking executor.
-
Method Details
-
schemaFile
Adds the schemaFiles. If not set, theschema.graphqlorschema.graphqlswill be imported from the resource. -
schemaFile
Adds the schemaFiles. If not set, theschema.graphqlorschema.graphqlswill be imported from the resource. -
schemaUrls
Adds the schema loaded from the given URLs. If not set, theschema.graphqlorschema.graphqlswill be imported from the resource. -
schemaUrls
Adds the schema loaded from the given URLs. If not set, theschema.graphqlorschema.graphqlswill be imported from the resource. -
schema
Sets theGraphQLSchema. -
configureDataLoaderRegistry
public GraphqlServiceBuilder configureDataLoaderRegistry(Consumer<org.dataloader.DataLoaderRegistry>... configurers) Adds theDataLoaderRegistryconsumers. -
configureDataLoaderRegistry
public GraphqlServiceBuilder configureDataLoaderRegistry(Iterable<? extends Consumer<? super org.dataloader.DataLoaderRegistry>> configurers) Adds theDataLoaderRegistryconsumers. -
runtimeWiring
Adds theRuntimeWiringConfigurators. -
runtimeWiring
public GraphqlServiceBuilder runtimeWiring(Iterable<? extends RuntimeWiringConfigurator> configurators) Adds theRuntimeWiringConfigurators. -
typeVisitors
Adds theGraphQLTypeVisitors. -
typeVisitors
public GraphqlServiceBuilder typeVisitors(Iterable<? extends graphql.schema.GraphQLTypeVisitor> typeVisitors) Adds theGraphQLTypeVisitors. -
instrumentation
public GraphqlServiceBuilder instrumentation(graphql.execution.instrumentation.Instrumentation... instrumentations) Adds theInstrumentations. -
instrumentation
public GraphqlServiceBuilder instrumentation(Iterable<? extends graphql.execution.instrumentation.Instrumentation> instrumentations) Adds theInstrumentations. -
configureGraphql
Adds theGraphqlConfiguratorconsumers. -
configureGraphql
Adds theGraphqlConfiguratorconsumers. -
useBlockingTaskExecutor
Sets whether the service executes service methods using the blocking executor. -
build
Creates aGraphqlService.
-