public class CombinedWiringFactory extends java.lang.Object implements WiringFactory
WiringFactory
s 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)
WiringFactory
providesTypeResolver
in interface WiringFactory
environment
- the wiring environmentpublic TypeResolver getTypeResolver(InterfaceWiringEnvironment environment)
WiringFactory
TypeResolver
given the type interfacegetTypeResolver
in interface WiringFactory
environment
- the wiring environmentTypeResolver
public boolean providesTypeResolver(UnionWiringEnvironment environment)
WiringFactory
providesTypeResolver
in interface WiringFactory
environment
- the wiring environmentpublic TypeResolver getTypeResolver(UnionWiringEnvironment environment)
WiringFactory
TypeResolver
given the type uniongetTypeResolver
in interface WiringFactory
environment
- the union wiring environmentTypeResolver
public boolean providesDataFetcherFactory(FieldWiringEnvironment environment)
WiringFactory
DataFetcherFactory
for the definitionprovidesDataFetcherFactory
in interface WiringFactory
environment
- the wiring environmentpublic <T> DataFetcherFactory<T> getDataFetcherFactory(FieldWiringEnvironment environment)
WiringFactory
DataFetcherFactory
given the type definitiongetDataFetcherFactory
in interface WiringFactory
T
- the type of the data fetcherenvironment
- the wiring environmentDataFetcherFactory
public boolean providesDataFetcher(FieldWiringEnvironment environment)
WiringFactory
providesDataFetcher
in interface WiringFactory
environment
- the wiring environmentpublic DataFetcher getDataFetcher(FieldWiringEnvironment environment)
WiringFactory
DataFetcher
given the type definitiongetDataFetcher
in interface WiringFactory
environment
- the wiring environmentDataFetcher
public boolean providesScalar(ScalarWiringEnvironment environment)
WiringFactory
providesScalar
in interface WiringFactory
environment
- the wiring environmentpublic GraphQLScalarType getScalar(ScalarWiringEnvironment environment)
WiringFactory
GraphQLScalarType
given scalar defined in IDLgetScalar
in interface WiringFactory
environment
- the wiring environmentGraphQLScalarType
public boolean providesSchemaDirectiveWiring(SchemaDirectiveWiringEnvironment environment)
WiringFactory
SchemaDirectiveWiringEnvironment.getDirectives()
contains all the directives
available which may in fact be an empty list.
providesSchemaDirectiveWiring
in interface WiringFactory
environment
- the calling environmentpublic SchemaDirectiveWiring getSchemaDirectiveWiring(SchemaDirectiveWiringEnvironment environment)
WiringFactory
SchemaDirectiveWiring
given the environmentgetSchemaDirectiveWiring
in interface WiringFactory
environment
- the calling environmentSchemaDirectiveWiring
public DataFetcher getDefaultDataFetcher(FieldWiringEnvironment environment)
WiringFactory
getDefaultDataFetcher
in interface WiringFactory
environment
- the wiring environmentDataFetcher