@PublicApi public class CombinedWiringFactory extends java.lang.Object implements WiringFactory
WiringFactorys together to act as one. It asks each one
whether it handles a type and delegates to the first one to answer yes.| Constructor and Description |
|---|
CombinedWiringFactory(java.util.List<WiringFactory> factories) |
| Modifier and Type | Method and Description |
|---|---|
DataFetcher |
getDataFetcher(FieldWiringEnvironment environment)
Returns a
DataFetcher given the type definition |
<T> DataFetcherFactory<T> |
getDataFetcherFactory(FieldWiringEnvironment environment)
Returns a
DataFetcherFactory given the type definition |
DataFetcher |
getDefaultDataFetcher(FieldWiringEnvironment environment)
All fields need a data fetcher of some sort and this method is called to provide the data fetcher
that will be used if no specific one has been provided
|
GraphQLScalarType |
getScalar(ScalarWiringEnvironment environment)
Returns a
GraphQLScalarType given scalar defined in IDL |
SchemaDirectiveWiring |
getSchemaDirectiveWiring(SchemaDirectiveWiringEnvironment environment)
Returns a
SchemaDirectiveWiring given the environment |
TypeResolver |
getTypeResolver(InterfaceWiringEnvironment environment)
Returns a
TypeResolver given the type interface |
TypeResolver |
getTypeResolver(UnionWiringEnvironment environment)
Returns a
TypeResolver given the type union |
boolean |
providesDataFetcher(FieldWiringEnvironment environment)
This is called to ask if this factory can provide a data fetcher for the definition
|
boolean |
providesDataFetcherFactory(FieldWiringEnvironment environment)
This is called to ask if this factory can provide a
DataFetcherFactory for the definition |
boolean |
providesScalar(ScalarWiringEnvironment environment)
This is called to ask if this factory can provide a custom scalar
|
boolean |
providesSchemaDirectiveWiring(SchemaDirectiveWiringEnvironment environment)
This is called to ask if this factory can provide a schema directive wiring.
|
boolean |
providesTypeResolver(InterfaceWiringEnvironment environment)
This is called to ask if this factory can provide a type resolver for the interface
|
boolean |
providesTypeResolver(UnionWiringEnvironment environment)
This is called to ask if this factory can provide a type resolver for the union
|
public CombinedWiringFactory(java.util.List<WiringFactory> factories)
public boolean providesTypeResolver(InterfaceWiringEnvironment environment)
WiringFactoryprovidesTypeResolver in interface WiringFactoryenvironment - the wiring environmentpublic TypeResolver getTypeResolver(InterfaceWiringEnvironment environment)
WiringFactoryTypeResolver given the type interfacegetTypeResolver in interface WiringFactoryenvironment - the wiring environmentTypeResolverpublic boolean providesTypeResolver(UnionWiringEnvironment environment)
WiringFactoryprovidesTypeResolver in interface WiringFactoryenvironment - the wiring environmentpublic TypeResolver getTypeResolver(UnionWiringEnvironment environment)
WiringFactoryTypeResolver given the type uniongetTypeResolver in interface WiringFactoryenvironment - the union wiring environmentTypeResolverpublic boolean providesDataFetcherFactory(FieldWiringEnvironment environment)
WiringFactoryDataFetcherFactory for the definitionprovidesDataFetcherFactory in interface WiringFactoryenvironment - the wiring environmentpublic <T> DataFetcherFactory<T> getDataFetcherFactory(FieldWiringEnvironment environment)
WiringFactoryDataFetcherFactory given the type definitiongetDataFetcherFactory in interface WiringFactoryT - the type of the data fetcherenvironment - the wiring environmentDataFetcherFactorypublic boolean providesDataFetcher(FieldWiringEnvironment environment)
WiringFactoryprovidesDataFetcher in interface WiringFactoryenvironment - the wiring environmentpublic DataFetcher getDataFetcher(FieldWiringEnvironment environment)
WiringFactoryDataFetcher given the type definitiongetDataFetcher in interface WiringFactoryenvironment - the wiring environmentDataFetcherpublic boolean providesScalar(ScalarWiringEnvironment environment)
WiringFactoryprovidesScalar in interface WiringFactoryenvironment - the wiring environmentpublic GraphQLScalarType getScalar(ScalarWiringEnvironment environment)
WiringFactoryGraphQLScalarType given scalar defined in IDLgetScalar in interface WiringFactoryenvironment - the wiring environmentGraphQLScalarTypepublic boolean providesSchemaDirectiveWiring(SchemaDirectiveWiringEnvironment environment)
WiringFactory
SchemaDirectiveWiringEnvironment.getDirectives() contains all the directives
available which may in fact be an empty list.
providesSchemaDirectiveWiring in interface WiringFactoryenvironment - the calling environmentpublic SchemaDirectiveWiring getSchemaDirectiveWiring(SchemaDirectiveWiringEnvironment environment)
WiringFactorySchemaDirectiveWiring given the environmentgetSchemaDirectiveWiring in interface WiringFactoryenvironment - the calling environmentSchemaDirectiveWiringpublic DataFetcher getDefaultDataFetcher(FieldWiringEnvironment environment)
WiringFactorygetDefaultDataFetcher in interface WiringFactoryenvironment - the wiring environmentDataFetcher