Interface DataFetchersDelegate
- All Known Implementing Classes:
DataFetchersDelegateImpl
public interface DataFetchersDelegate
This class represents a GraphQL Data Fetcher Delegate. A DataFetchersDelegate aggregates all
Thus there are two kinds of
The arguments for the data fetcher delegates are the arguments of its field.
DataFetcher
for
a GraphQL type. It is only used when in server mode, the GraphQL maven plugin generates on data fetcher delegate for
each object whose fields need at least one data fetcher. This helps to limit the impact on the specific code, when
the GraphQL schema changes. Thus there are two kinds of
DataFetchersDelegate
:
- The
DataFetchersDelegate
for regular GraphQL objects. TheseDataFetcher
s are used to read non scalar fields, that is: fields that are subjects, like friends of the human types, in the StarWars schema. - The
DataFetchersDelegate
for queries, mutations and subscriptions type. TheseDataFetchersDelegate
are actually the entry points of the GraphQL server. For suchDataFetchersDelegate
s, each field is actually aDataFetcher
.
The arguments for the data fetcher delegates are the arguments of its field.
- Author:
- etienne-sf
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves theBatchLoader
s that are to be implemented by this Data Fetcher Delegate.default String
The name of the DataFetcher, in camelCase.Retrieves theDataFetcher
s that are to be implemented by this Data Fetcher Delegate.getName()
The name of the DataFetcher.default String
The name of the DataFetcher, in PascalCase.getType()
Returns theType
, for which the DataFetchersDelegate aggregates the access methods.
-
Method Details
-
getName
String getName()The name of the DataFetcher. This name is a valid java classname identifier, and is the name to use as a method name.- Returns:
-
getType
Type getType()Returns theType
, for which the DataFetchersDelegate aggregates the access methods.- Returns:
-
getCamelCaseName
The name of the DataFetcher, in camelCase. This name is a valid for a java variable identifier, and is the name to use as a method name.- Returns:
-
getPascalCaseName
The name of the DataFetcher, in PascalCase. This name is a valid for a java type identifier.- Returns:
-
getDataFetchers
List<DataFetcher> getDataFetchers()Retrieves theDataFetcher
s that are to be implemented by this Data Fetcher Delegate.- Returns:
-
getBatchLoaders
List<BatchLoader> getBatchLoaders()Retrieves theBatchLoader
s that are to be implemented by this Data Fetcher Delegate.- Returns:
-