@PublicSpi public interface WiringFactory
TypeResolver
s and DataFetcher
s
based on the IDL definitions. For example you could look at the directives say to build a more dynamic
set of type resolvers and data fetchers.Modifier and Type | Method and Description |
---|---|
default DataFetcher |
getDataFetcher(FieldWiringEnvironment environment)
Returns a
DataFetcher given the type definition |
default 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
|
default TypeResolver |
getTypeResolver(InterfaceWiringEnvironment environment)
Returns a
TypeResolver given the type interface |
default TypeResolver |
getTypeResolver(UnionWiringEnvironment environment)
Returns a
TypeResolver given the type union |
default boolean |
providesDataFetcher(FieldWiringEnvironment environment)
This is called to ask if this factory can provide a data fetcher for the definition
|
default boolean |
providesTypeResolver(InterfaceWiringEnvironment environment)
This is called to ask if this factory can provide a type resolver for the interface
|
default boolean |
providesTypeResolver(UnionWiringEnvironment environment)
This is called to ask if this factory can provide a type resolver for the union
|
default boolean providesTypeResolver(InterfaceWiringEnvironment environment)
environment
- the wiring environmentdefault TypeResolver getTypeResolver(InterfaceWiringEnvironment environment)
TypeResolver
given the type interfaceenvironment
- the wiring environmentTypeResolver
default boolean providesTypeResolver(UnionWiringEnvironment environment)
environment
- the wiring environmentdefault TypeResolver getTypeResolver(UnionWiringEnvironment environment)
TypeResolver
given the type unionenvironment
- the union wiring environmentTypeResolver
default boolean providesDataFetcher(FieldWiringEnvironment environment)
environment
- the wiring environmentdefault DataFetcher getDataFetcher(FieldWiringEnvironment environment)
DataFetcher
given the type definitionenvironment
- the wiring environmentDataFetcher
default DataFetcher getDefaultDataFetcher(FieldWiringEnvironment environment)
environment
- the wiring environmentDataFetcher