@PublicApi public class TypeResolutionEnvironment extends java.lang.Object
TypeResolver to help with object type resolution.
See TypeResolver.getType(graphql.TypeResolutionEnvironment) for how this is used| Constructor and Description |
|---|
TypeResolutionEnvironment(TypeResolutionParameters parameters) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getArguments() |
<T> T |
getContext()
Deprecated.
use
getGraphQLContext() instead |
MergedField |
getField() |
GraphQLType |
getFieldType() |
GraphQLContext |
getGraphQLContext() |
<T> T |
getLocalContext()
Returns the local context object set in via
DataFetcherResult.getLocalContext() |
<T> T |
getObject()
You will be passed the specific source object that needs to be resolved into a concrete graphql object type
|
GraphQLSchema |
getSchema() |
DataFetchingFieldSelectionSet |
getSelectionSet() |
public TypeResolutionEnvironment(TypeResolutionParameters parameters)
public <T> T getObject()
T - you decide what type it ispublic java.util.Map<java.lang.String,java.lang.Object> getArguments()
public MergedField getField()
public GraphQLType getFieldType()
GraphQLUnionType or a
GraphQLInterfaceTypepublic GraphQLSchema getSchema()
@Deprecated public <T> T getContext()
getGraphQLContext() insteadExecutionInput.getContext()T - the type to cast the result topublic GraphQLContext getGraphQLContext()
GraphQLContext object set in via ExecutionInput.getGraphQLContext()public <T> T getLocalContext()
DataFetcherResult.getLocalContext()T - the type to cast the result topublic DataFetchingFieldSelectionSet getSelectionSet()
DataFetchingFieldSelectionSet for the current field fetch that needs type resolution