Package graphql.schema
Interface DataFetcherFactory<T>
- Type Parameters:
T
- the type of DataFetcher
A DataFetcherFactory allows a level of indirection in providing
DataFetcher
s for graphql fields.
For example if you are using an IoC container such as Spring or Guice, you can use this indirection to give you
per request late binding of a data fetcher with its dependencies injected in.-
Method Summary
Modifier and TypeMethodDescriptionget
(DataFetcherFactoryEnvironment environment) Returns aDataFetcher
-
Method Details
-
get
Returns aDataFetcher
- Parameters:
environment
- the environment that needs the data fetcher- Returns:
- a data fetcher
-