Package graphql.schema.idl
Class CombinedWiringFactory
java.lang.Object
graphql.schema.idl.CombinedWiringFactory
- All Implemented Interfaces:
WiringFactory
This combines a number of
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDataFetcher(FieldWiringEnvironment environment) Returns aDataFetchergiven the type definition<T> DataFetcherFactory<T> getDataFetcherFactory(FieldWiringEnvironment environment) Returns aDataFetcherFactorygiven the type definitiongetDefaultDataFetcher(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 providedgetScalar(ScalarWiringEnvironment environment) Returns aGraphQLScalarTypegiven scalar defined in IDLgetSchemaDirectiveWiring(SchemaDirectiveWiringEnvironment environment) Returns aSchemaDirectiveWiringgiven the environmentgetTypeResolver(InterfaceWiringEnvironment environment) Returns aTypeResolvergiven the type interfacegetTypeResolver(UnionWiringEnvironment environment) Returns aTypeResolvergiven the type unionbooleanprovidesDataFetcher(FieldWiringEnvironment environment) This is called to ask if this factory can provide a data fetcher for the definitionbooleanprovidesDataFetcherFactory(FieldWiringEnvironment environment) This is called to ask if this factory can provide aDataFetcherFactoryfor the definitionbooleanprovidesScalar(ScalarWiringEnvironment environment) This is called to ask if this factory can provide a custom scalarbooleanThis is called to ask if this factory can provide a schema directive wiring.booleanprovidesTypeResolver(InterfaceWiringEnvironment environment) This is called to ask if this factory can provide a type resolver for the interfacebooleanprovidesTypeResolver(UnionWiringEnvironment environment) This is called to ask if this factory can provide a type resolver for the union
-
Constructor Details
-
CombinedWiringFactory
-
-
Method Details
-
providesTypeResolver
Description copied from interface:WiringFactoryThis is called to ask if this factory can provide a type resolver for the interface- Specified by:
providesTypeResolverin interfaceWiringFactory- Parameters:
environment- the wiring environment- Returns:
- true if the factory can give out a type resolver
-
getTypeResolver
Description copied from interface:WiringFactoryReturns aTypeResolvergiven the type interface- Specified by:
getTypeResolverin interfaceWiringFactory- Parameters:
environment- the wiring environment- Returns:
- a
TypeResolver
-
providesTypeResolver
Description copied from interface:WiringFactoryThis is called to ask if this factory can provide a type resolver for the union- Specified by:
providesTypeResolverin interfaceWiringFactory- Parameters:
environment- the wiring environment- Returns:
- true if the factory can give out a type resolver
-
getTypeResolver
Description copied from interface:WiringFactoryReturns aTypeResolvergiven the type union- Specified by:
getTypeResolverin interfaceWiringFactory- Parameters:
environment- the union wiring environment- Returns:
- a
TypeResolver
-
providesDataFetcherFactory
Description copied from interface:WiringFactoryThis is called to ask if this factory can provide aDataFetcherFactoryfor the definition- Specified by:
providesDataFetcherFactoryin interfaceWiringFactory- Parameters:
environment- the wiring environment- Returns:
- true if the factory can give out a data fetcher factory
-
getDataFetcherFactory
Description copied from interface:WiringFactoryReturns aDataFetcherFactorygiven the type definition- Specified by:
getDataFetcherFactoryin interfaceWiringFactory- Type Parameters:
T- the type of the data fetcher- Parameters:
environment- the wiring environment- Returns:
- a
DataFetcherFactory
-
providesDataFetcher
Description copied from interface:WiringFactoryThis is called to ask if this factory can provide a data fetcher for the definition- Specified by:
providesDataFetcherin interfaceWiringFactory- Parameters:
environment- the wiring environment- Returns:
- true if the factory can give out a data fetcher
-
getDataFetcher
Description copied from interface:WiringFactoryReturns aDataFetchergiven the type definition- Specified by:
getDataFetcherin interfaceWiringFactory- Parameters:
environment- the wiring environment- Returns:
- a
DataFetcher
-
providesScalar
Description copied from interface:WiringFactoryThis is called to ask if this factory can provide a custom scalar- Specified by:
providesScalarin interfaceWiringFactory- Parameters:
environment- the wiring environment- Returns:
- true if the factory can give out a type resolver
-
getScalar
Description copied from interface:WiringFactoryReturns aGraphQLScalarTypegiven scalar defined in IDL- Specified by:
getScalarin interfaceWiringFactory- Parameters:
environment- the wiring environment- Returns:
- a
GraphQLScalarType
-
providesSchemaDirectiveWiring
Description copied from interface:WiringFactoryThis is called to ask if this factory can provide a schema directive wiring.SchemaDirectiveWiringEnvironment.getDirectives()contains all the directives available which may in fact be an empty list.- Specified by:
providesSchemaDirectiveWiringin interfaceWiringFactory- Parameters:
environment- the calling environment- Returns:
- true if the factory can give out a schema directive wiring.
-
getSchemaDirectiveWiring
Description copied from interface:WiringFactoryReturns aSchemaDirectiveWiringgiven the environment- Specified by:
getSchemaDirectiveWiringin interfaceWiringFactory- Parameters:
environment- the calling environment- Returns:
- a
SchemaDirectiveWiring
-
getDefaultDataFetcher
Description copied from interface:WiringFactoryAll 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- Specified by:
getDefaultDataFetcherin interfaceWiringFactory- Parameters:
environment- the wiring environment- Returns:
- a
DataFetcher
-