public static class TypeRuntimeWiring.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
TypeRuntimeWiring |
build() |
TypeRuntimeWiring.Builder |
dataFetcher(java.lang.String fieldName,
DataFetcher dataFetcher)
Adds a data fetcher for the current type to the specified field
|
TypeRuntimeWiring.Builder |
dataFetchers(java.util.Map<java.lang.String,DataFetcher> dataFetchersMap)
Adds data fetchers for the current type to the specified field
|
TypeRuntimeWiring.Builder |
defaultDataFetcher(DataFetcher dataFetcher)
All fields in a type need a data fetcher of some sort and this method is called to provide the default data fetcher
that will be used for this type if no specific one has been provided per field.
|
TypeRuntimeWiring.Builder |
enumValues(EnumValuesProvider enumValuesProvider) |
TypeRuntimeWiring.Builder |
typeName(java.lang.String typeName)
Sets the type name for this type wiring.
|
TypeRuntimeWiring.Builder |
typeResolver(TypeResolver typeResolver)
Adds a
TypeResolver to the current type. |
public TypeRuntimeWiring.Builder typeName(java.lang.String typeName)
typeName
- the name of the typepublic TypeRuntimeWiring.Builder dataFetcher(java.lang.String fieldName, DataFetcher dataFetcher)
fieldName
- the field that data fetcher should apply todataFetcher
- the new data Fetcherpublic TypeRuntimeWiring.Builder dataFetchers(java.util.Map<java.lang.String,DataFetcher> dataFetchersMap)
dataFetchersMap
- a map of fields to data fetcherspublic TypeRuntimeWiring.Builder defaultDataFetcher(DataFetcher dataFetcher)
dataFetcher
- the default data fetcher to use for this typepublic TypeRuntimeWiring.Builder typeResolver(TypeResolver typeResolver)
TypeResolver
to the current type. This MUST be specified for Interface
and Union types.typeResolver
- the type resolver in playpublic TypeRuntimeWiring.Builder enumValues(EnumValuesProvider enumValuesProvider)
public TypeRuntimeWiring build()