Class RequestAwareDataFetcher<T>
- java.lang.Object
-
- org.craftercms.engine.graphql.impl.fetchers.RequestAwareDataFetcher<T>
-
- All Implemented Interfaces:
graphql.schema.DataFetcher<T>
- Direct Known Subclasses:
ContentTypeBasedDataFetcher
,UrlTransformDataFetcher
public abstract class RequestAwareDataFetcher<T> extends Object implements graphql.schema.DataFetcher<T>
Base implementation forDataFetcher
that set's the currentRequestContext
before actually resolving the requested fields.- Since:
- 3.1.1
- Author:
- joseross
-
-
Constructor Summary
Constructors Constructor Description RequestAwareDataFetcher()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract T
doGet(graphql.schema.DataFetchingEnvironment environment)
Performs the actual fetching of the requested fields.T
get(graphql.schema.DataFetchingEnvironment environment)
-
-
-
Method Detail
-
doGet
public abstract T doGet(graphql.schema.DataFetchingEnvironment environment) throws Exception
Performs the actual fetching of the requested fields.- Parameters:
environment
- theDataFetchingEnvironment
- Returns:
- the resolved value
- Throws:
Exception
- if there is any error resolving the requested field
-
-