Interface SelfDescribingDataFetcher<T>
- Type Parameters:
T- the type of data returned by theDataFetcher
- All Superinterfaces:
graphql.schema.DataFetcher<T>
public interface SelfDescribingDataFetcher<T>
extends graphql.schema.DataFetcher<T>
Specialized
DataFetcher that exposes additional details such as
return type information.- Since:
- 1.2.0
- Author:
- Brian Clozel, Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable MethodasMethod()Return the currentDataFetcheras a Java method, if possible.default Map<String, ResolvableType> Return a map with arguments that thisDataFetcherlooks up along with the Java types they are mapped to.Provide a description of theDataFetcherfor display or logging purposes.The return type of thisDataFetcher.default booleanWhether thisDataFetcheruses aDataLoaderto return data.Methods inherited from interface graphql.schema.DataFetcher
get
-
Method Details
-
getDescription
String getDescription()Provide a description of theDataFetcherfor display or logging purposes. Depending on the underlying implementation, this could be a controller method, a Spring Data repository backedDataFetcher, or other. -
getReturnType
ResolvableType getReturnType()The return type of thisDataFetcher.This could be derived from the method signature of an annotated
@Controllermethod, the domain type of aDataFetcherbacked by a Spring Data repository, or other. -
getArguments
Return a map with arguments that thisDataFetcherlooks up along with the Java types they are mapped to.- Since:
- 1.3.0
-
asMethod
Return the currentDataFetcheras a Java method, if possible.This can be supported for annotated
@Controller, or Spring DataRepositoryinterfaces.- Since:
- 2.0.0
-
usesDataLoader
default boolean usesDataLoader()Whether thisDataFetcheruses aDataLoaderto return data. This represents a deferred operation that is typically repeatable, and a candidate for aggregation from a metrics and tracing perspective.- Since:
- 1.4.0
-