Package graphql.schema.idl
Class RuntimeWiring
- java.lang.Object
-
- graphql.schema.idl.RuntimeWiring
-
@PublicApi public class RuntimeWiring extends java.lang.Object
A runtime wiring is a specification of data fetchers, type resolvers and custom scalars that are needed to wire together a functionalGraphQLSchema
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RuntimeWiring.Builder
-
Field Summary
Fields Modifier and Type Field Description static RuntimeWiring
MOCKED_WIRING
This is a Runtime wiring which provides mocked types resolver and scalars.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphQLCodeRegistry
getCodeRegistry()
GraphqlTypeComparatorRegistry
getComparatorRegistry()
java.util.Map<java.lang.String,DataFetcher>
getDataFetcherForType(java.lang.String typeName)
java.util.Map<java.lang.String,java.util.Map<java.lang.String,DataFetcher>>
getDataFetchers()
DataFetcher
getDefaultDataFetcherForType(java.lang.String typeName)
java.util.List<SchemaDirectiveWiring>
getDirectiveWiring()
java.util.Map<java.lang.String,EnumValuesProvider>
getEnumValuesProviders()
GraphqlFieldVisibility
getFieldVisibility()
java.util.Map<java.lang.String,SchemaDirectiveWiring>
getRegisteredDirectiveWiring()
java.util.Map<java.lang.String,GraphQLScalarType>
getScalars()
java.util.Collection<SchemaGeneratorPostProcessing>
getSchemaGeneratorPostProcessings()
java.util.Map<java.lang.String,TypeResolver>
getTypeResolvers()
WiringFactory
getWiringFactory()
static RuntimeWiring.Builder
newRuntimeWiring()
static RuntimeWiring.Builder
newRuntimeWiring(RuntimeWiring originalRuntimeWiring)
RuntimeWiring
transform(java.util.function.Consumer<RuntimeWiring.Builder> builderConsumer)
This helps you transform the current RuntimeWiring object into another one by starting a builder with all the current values and allows you to transform it how you want.
-
-
-
Field Detail
-
MOCKED_WIRING
public static final RuntimeWiring MOCKED_WIRING
This is a Runtime wiring which provides mocked types resolver and scalars. Useful for testing only.
-
-
Method Detail
-
newRuntimeWiring
public static RuntimeWiring.Builder newRuntimeWiring()
- Returns:
- a builder of Runtime Wiring
-
newRuntimeWiring
public static RuntimeWiring.Builder newRuntimeWiring(RuntimeWiring originalRuntimeWiring)
- Parameters:
originalRuntimeWiring
- the runtime wiring to start from- Returns:
- a builder of Runtime Wiring based on the provided one
-
transform
public RuntimeWiring transform(java.util.function.Consumer<RuntimeWiring.Builder> builderConsumer)
This helps you transform the current RuntimeWiring object into another one by starting a builder with all the current values and allows you to transform it how you want.- Parameters:
builderConsumer
- the consumer code that will be given a builder to transform- Returns:
- a new RuntimeWiring object based on calling build on that builder
-
getCodeRegistry
public GraphQLCodeRegistry getCodeRegistry()
-
getScalars
public java.util.Map<java.lang.String,GraphQLScalarType> getScalars()
-
getDataFetchers
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,DataFetcher>> getDataFetchers()
-
getDataFetcherForType
public java.util.Map<java.lang.String,DataFetcher> getDataFetcherForType(java.lang.String typeName)
-
getDefaultDataFetcherForType
public DataFetcher getDefaultDataFetcherForType(java.lang.String typeName)
-
getTypeResolvers
public java.util.Map<java.lang.String,TypeResolver> getTypeResolvers()
-
getEnumValuesProviders
public java.util.Map<java.lang.String,EnumValuesProvider> getEnumValuesProviders()
-
getWiringFactory
public WiringFactory getWiringFactory()
-
getFieldVisibility
public GraphqlFieldVisibility getFieldVisibility()
-
getRegisteredDirectiveWiring
public java.util.Map<java.lang.String,SchemaDirectiveWiring> getRegisteredDirectiveWiring()
-
getDirectiveWiring
public java.util.List<SchemaDirectiveWiring> getDirectiveWiring()
-
getSchemaGeneratorPostProcessings
public java.util.Collection<SchemaGeneratorPostProcessing> getSchemaGeneratorPostProcessings()
-
getComparatorRegistry
public GraphqlTypeComparatorRegistry getComparatorRegistry()
-
-