Class FieldDataFetcher<T>
- java.lang.Object
-
- io.smallrye.graphql.execution.datafetcher.FieldDataFetcher<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
graphql.schema.DataFetcher<T>
,graphql.TrivialDataFetcher<T>
,PlugableDataFetcher<T>
public class FieldDataFetcher<T> extends Object implements PlugableDataFetcher<T>, graphql.TrivialDataFetcher<T>
Custom property data fetcher to allow arbitrary method names (instead of getters/setters) and to intercept the result for some manipulation.- Implementation Note:
- If the (graphql-) field has no methodName, a
FieldDataFetcher.FieldAccessor
for the (java-) field is is created. Otherwise, aFieldDataFetcher.MethodAccessor
is created for the accessor method.The owner is used to create the
FieldDataFetcher.PropertyAccessor
independently of the source object (which could be a different subtype of the owner class for each call).
-
-
Constructor Summary
Constructors Constructor Description FieldDataFetcher(Field field, Type type, Reference owner)
-