@PublicApi public static class RuntimeWiring.Builder extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
RuntimeWiring |
build() |
RuntimeWiring.Builder |
codeRegistry(GraphQLCodeRegistry.Builder codeRegistry)
This allows you to seed in your own
GraphQLCodeRegistry instance |
RuntimeWiring.Builder |
codeRegistry(GraphQLCodeRegistry codeRegistry)
This allows you to seed in your own
GraphQLCodeRegistry instance |
RuntimeWiring.Builder |
comparatorRegistry(GraphqlTypeComparatorRegistry comparatorRegistry)
You can specify your own sort order of graphql types via
GraphqlTypeComparatorRegistry
which will tell you what type of objects you are to sort when
it asks for a comparator. |
RuntimeWiring.Builder |
directive(java.lang.String directiveName,
SchemaDirectiveWiring schemaDirectiveWiring)
This provides the wiring code for a named directive.
|
RuntimeWiring.Builder |
directiveWiring(SchemaDirectiveWiring schemaDirectiveWiring)
This adds a directive wiring that will be called for all directives.
|
RuntimeWiring.Builder |
fieldVisibility(GraphqlFieldVisibility fieldVisibility)
This allows you to add a field visibility that will be associated with the schema
|
RuntimeWiring.Builder |
scalar(GraphQLScalarType scalarType)
This allows you to add in new custom Scalar implementations beyond the standard set.
|
RuntimeWiring.Builder |
transformer(SchemaGeneratorPostProcessing schemaGeneratorPostProcessing)
Deprecated.
This mechanism can be achieved in a better way via
SchemaTransformer
after the schema is built |
RuntimeWiring.Builder |
type(java.lang.String typeName,
java.util.function.UnaryOperator<TypeRuntimeWiring.Builder> builderFunction)
This form allows a lambda to be used as the builder of a type wiring
|
RuntimeWiring.Builder |
type(TypeRuntimeWiring.Builder builder)
This allows you to add a new type wiring via a builder
|
RuntimeWiring.Builder |
type(TypeRuntimeWiring typeRuntimeWiring)
This adds a type wiring
|
RuntimeWiring.Builder |
wiringFactory(WiringFactory wiringFactory)
Adds a wiring factory into the runtime wiring
|
public RuntimeWiring.Builder wiringFactory(WiringFactory wiringFactory)
wiringFactory
- the wiring factory to addpublic RuntimeWiring.Builder codeRegistry(GraphQLCodeRegistry codeRegistry)
GraphQLCodeRegistry
instancecodeRegistry
- the code registry to usepublic RuntimeWiring.Builder codeRegistry(GraphQLCodeRegistry.Builder codeRegistry)
GraphQLCodeRegistry
instancecodeRegistry
- the code registry to usepublic RuntimeWiring.Builder scalar(GraphQLScalarType scalarType)
scalarType
- the new scalar implementationpublic RuntimeWiring.Builder fieldVisibility(GraphqlFieldVisibility fieldVisibility)
fieldVisibility
- the new field visibilitypublic RuntimeWiring.Builder type(TypeRuntimeWiring.Builder builder)
builder
- the type wiring builder to usepublic RuntimeWiring.Builder type(java.lang.String typeName, java.util.function.UnaryOperator<TypeRuntimeWiring.Builder> builderFunction)
typeName
- the name of the type to wirebuilderFunction
- a function that will be given the builder to usepublic RuntimeWiring.Builder type(TypeRuntimeWiring typeRuntimeWiring)
typeRuntimeWiring
- the new type wiringpublic RuntimeWiring.Builder directive(java.lang.String directiveName, SchemaDirectiveWiring schemaDirectiveWiring)
Note: The provided directive wiring will ONLY be called back if an element has a directive with the specified name.
To be called back for every directive the use directiveWiring(SchemaDirectiveWiring)
or
use WiringFactory.providesSchemaDirectiveWiring(SchemaDirectiveWiringEnvironment)
instead.
directiveName
- the name of the directive to wireschemaDirectiveWiring
- the runtime behaviour of this wiringdirectiveWiring(SchemaDirectiveWiring)
,
SchemaDirectiveWiring
,
WiringFactory.providesSchemaDirectiveWiring(SchemaDirectiveWiringEnvironment)
public RuntimeWiring.Builder directiveWiring(SchemaDirectiveWiring schemaDirectiveWiring)
Note : Unlike directive(String, SchemaDirectiveWiring)
which is only called back if a named
directives is present, this directive wiring will be called back for every element
in the schema even if it has zero directives.
schemaDirectiveWiring
- the runtime behaviour of this wiringdirective(String, SchemaDirectiveWiring)
,
SchemaDirectiveWiring
,
WiringFactory.providesSchemaDirectiveWiring(SchemaDirectiveWiringEnvironment)
public RuntimeWiring.Builder comparatorRegistry(GraphqlTypeComparatorRegistry comparatorRegistry)
GraphqlTypeComparatorRegistry
which will tell you what type of objects you are to sort when
it asks for a comparator.comparatorRegistry
- your own comparator registry@Deprecated public RuntimeWiring.Builder transformer(SchemaGeneratorPostProcessing schemaGeneratorPostProcessing)
SchemaTransformer
after the schema is builtschemaGeneratorPostProcessing
- the non null schema transformer to addpublic RuntimeWiring build()