Package graphql.schema.idl
Class TypeRuntimeWiring
- java.lang.Object
-
- graphql.schema.idl.TypeRuntimeWiring
-
@PublicApi public class TypeRuntimeWiring extends java.lang.Object
A type runtime wiring is a specification of the data fetchers and possible type resolver for a given type name. This is used byRuntimeWiringto wire together a functionalGraphQLSchema
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypeRuntimeWiring.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DataFetchergetDefaultDataFetcher()EnumValuesProvidergetEnumValuesProvider()java.util.Map<java.lang.String,DataFetcher>getFieldDataFetchers()static booleangetStrictModeJvmWide()java.lang.StringgetTypeName()TypeResolvergetTypeResolver()static TypeRuntimeWiring.BuildernewTypeWiring(java.lang.String typeName)Creates a new type wiring builderstatic TypeRuntimeWiringnewTypeWiring(java.lang.String typeName, java.util.function.UnaryOperator<TypeRuntimeWiring.Builder> builderFunction)This form allows a lambda to be used as the builderstatic voidsetStrictModeJvmWide(boolean strictMode)By defaultTypeRuntimeWiringbuilders are not in strict mode, but you can set a JVM wide value so that any created will be.
-
-
-
Method Detail
-
setStrictModeJvmWide
public static void setStrictModeJvmWide(boolean strictMode)
By defaultTypeRuntimeWiringbuilders are not in strict mode, but you can set a JVM wide value so that any created will be.- Parameters:
strictMode- the desired strict mode state- See Also:
TypeRuntimeWiring.Builder.strictMode()
-
getStrictModeJvmWide
public static boolean getStrictModeJvmWide()
- Returns:
- the current JVM wide state of strict mode
-
newTypeWiring
public static TypeRuntimeWiring.Builder newTypeWiring(java.lang.String typeName)
Creates a new type wiring builder- Parameters:
typeName- the name of the type to wire- Returns:
- the builder
-
newTypeWiring
public static TypeRuntimeWiring newTypeWiring(java.lang.String typeName, java.util.function.UnaryOperator<TypeRuntimeWiring.Builder> builderFunction)
This form allows a lambda to be used as the builder- Parameters:
typeName- the name of the type to wirebuilderFunction- a function that will be given the builder to use- Returns:
- the same builder back please
-
getTypeName
public java.lang.String getTypeName()
-
getFieldDataFetchers
public java.util.Map<java.lang.String,DataFetcher> getFieldDataFetchers()
-
getDefaultDataFetcher
public DataFetcher getDefaultDataFetcher()
-
getTypeResolver
public TypeResolver getTypeResolver()
-
getEnumValuesProvider
public EnumValuesProvider getEnumValuesProvider()
-
-