@PublicApi public class StaticDataFetcher extends java.lang.Object implements DataFetcher, TrivialDataFetcher
DataFetcher
that always returns the same valueConstructor and Description |
---|
StaticDataFetcher(java.lang.Object value) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(DataFetchingEnvironment environment)
This is called by the graphql engine to fetch the value.
|
public java.lang.Object get(DataFetchingEnvironment environment)
DataFetcher
DataFetchingEnvironment
is a composite
context object that tells you all you need to know about how to fetch a data value in graphql type terms.get
in interface DataFetcher
environment
- this is the data fetching environment which contains all the context you need to fetch a valueDataFetcherResult