Package graphql
Class TypeResolutionEnvironment
java.lang.Object
graphql.TypeResolutionEnvironment
This is passed to a
TypeResolver to help with object type resolution.
See TypeResolver.getType(graphql.TypeResolutionEnvironment) for how this is used-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TDeprecated.getField()<T> TReturns the local context object set in viaDataFetcherResult.getLocalContext()<T> TYou will be passed the specific source object that needs to be resolved into a concrete graphql object type
-
Constructor Details
-
TypeResolutionEnvironment
-
-
Method Details
-
getObject
public <T> T getObject()You will be passed the specific source object that needs to be resolved into a concrete graphql object type- Type Parameters:
T- you decide what type it is- Returns:
- the object that needs to be resolved into a specific graphql object type
-
getArguments
- Returns:
- the runtime arguments to this the graphql field
-
getField
- Returns:
- the graphql field in question
-
getFieldType
- Returns:
- the type of the graphql field, which still be either a
GraphQLUnionTypeor aGraphQLInterfaceType
-
getSchema
- Returns:
- the graphql schema in question
-
getContext
Deprecated.usegetGraphQLContext()insteadReturns the context object set in viaExecutionInput.getContext()- Type Parameters:
T- the type to cast the result to- Returns:
- the context object
-
getGraphQLContext
- Returns:
- the
GraphQLContextobject set in viaExecutionInput.getGraphQLContext()
-
getLocalContext
public <T> T getLocalContext()Returns the local context object set in viaDataFetcherResult.getLocalContext()- Type Parameters:
T- the type to cast the result to- Returns:
- the local context object
-
getSelectionSet
- Returns:
- the
DataFetchingFieldSelectionSetfor the current field fetch that needs type resolution
-
getGraphQLContext()instead