Package graphql
Class GraphQL.Builder
- java.lang.Object
-
- graphql.GraphQL.Builder
-
- Enclosing class:
- GraphQL
@PublicApi public static class GraphQL.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder(GraphQLSchema graphQLSchema)
-
Method Summary
-
-
-
Constructor Detail
-
Builder
public Builder(GraphQLSchema graphQLSchema)
-
-
Method Detail
-
schema
public GraphQL.Builder schema(GraphQLSchema graphQLSchema)
-
queryExecutionStrategy
public GraphQL.Builder queryExecutionStrategy(ExecutionStrategy executionStrategy)
-
mutationExecutionStrategy
public GraphQL.Builder mutationExecutionStrategy(ExecutionStrategy executionStrategy)
-
subscriptionExecutionStrategy
public GraphQL.Builder subscriptionExecutionStrategy(ExecutionStrategy executionStrategy)
-
defaultDataFetcherExceptionHandler
public GraphQL.Builder defaultDataFetcherExceptionHandler(DataFetcherExceptionHandler dataFetcherExceptionHandler)
This allows you to set a defaultDataFetcherExceptionHandler
that will be used to handle exceptions that happen inDataFetcher
invocations.- Parameters:
dataFetcherExceptionHandler
- the default handler for data fetching exception- Returns:
- this builder
-
instrumentation
public GraphQL.Builder instrumentation(Instrumentation instrumentation)
-
preparsedDocumentProvider
public GraphQL.Builder preparsedDocumentProvider(PreparsedDocumentProvider preparsedDocumentProvider)
-
executionIdProvider
public GraphQL.Builder executionIdProvider(ExecutionIdProvider executionIdProvider)
-
doNotAddDefaultInstrumentations
public GraphQL.Builder doNotAddDefaultInstrumentations()
For performance reasons you can opt into situation where the default instrumentations (such asDataLoaderDispatcherInstrumentation
will not be automatically added into the graphql instance.For most situations this is not needed unless you are really pushing the boundaries of performance
By default a certain graphql instrumentations will be added to the mix to more easily enable certain functionality. This allows you to stop this behavior
- Returns:
- this builder
-
valueUnboxer
public GraphQL.Builder valueUnboxer(ValueUnboxer valueUnboxer)
-
build
public GraphQL build()
-
-