All Downloads are FREE. Search and download functionalities are using the official Maven repository.

graphql.schema.DataFetcherFactory Maven / Gradle / Ivy

There is a newer version: 230521-nf-execution
Show newest version
package graphql.schema;

import graphql.PublicSpi;

/**
 * A DataFetcherFactory allows a level of indirection in providing {@link graphql.schema.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.
 *
 * @param  the type of DataFetcher
 */
@PublicSpi
public interface DataFetcherFactory {

    /**
     * Returns a {@link graphql.schema.DataFetcher}
     *
     * @param environment the environment that needs the data fetcher
     *
     * @return a data fetcher
     */
    DataFetcher get(DataFetcherFactoryEnvironment environment);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy