Interface DataFetcher
public interface DataFetcher
Resolves one field: what the build generates for each @QueryMapping,
@MutationMapping, @SubscriptionMapping and @SchemaMapping method, and
what a program registers by hand with GraphQL.Builder.fetcher(String, String, DataFetcher).
A field with no fetcher reads the property of its parent value with the
field's name: an entry of a Map, or a property of an object the JSON
codecs can write -- the way Spring for GraphQL falls back to a getter.
-
Method Summary
-
Method Details
-
get
The field's value. A
List, array orIterablefor a list field; aGraphQLStreamfor a subscription field.Throws
Exception: the field resolves to null and an error is reported; seeGraphQLExceptionfor an error with a message of its own
- Throws:
Exception
-