Package graphql.schema
Class StaticDataFetcher
java.lang.Object
graphql.schema.StaticDataFetcher
- All Implemented Interfaces:
DataFetcher,TrivialDataFetcher
A
DataFetcher that always returns the same value-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(DataFetchingEnvironment environment) This is called by the graphql engine to fetch the value.
-
Constructor Details
-
StaticDataFetcher
-
-
Method Details
-
get
Description copied from interface:DataFetcherThis is called by the graphql engine to fetch the value. TheDataFetchingEnvironmentis a composite context object that tells you all you need to know about how to fetch a data value in graphql type terms.- Specified by:
getin interfaceDataFetcher- Parameters:
environment- this is the data fetching environment which contains all the context you need to fetch a value- Returns:
- a value of type T. May be wrapped in a
DataFetcherResult
-