@PublicApi public class StaticDataFetcher extends Object implements DataFetcher, TrivialDataFetcher
DataFetcher
that always returns the same valueConstructor and Description |
---|
StaticDataFetcher(Object value) |
Modifier and Type | Method and Description |
---|---|
Object |
get(DataFetchingEnvironment environment)
This is called by the graphql engine to fetch the value.
|
public StaticDataFetcher(Object value)
public 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
Copyright © 2019. All rights reserved.