public class TypeResolutionEnvironment extends Object
TypeResolver
to help with object type resolution.
See TypeResolver.getType(TypeResolutionEnvironment)
for how this is usedConstructor and Description |
---|
TypeResolutionEnvironment(Object object,
Map<String,Object> arguments,
MergedField field,
GraphQLType fieldType,
GraphQLSchema schema,
Object context) |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
getArguments() |
<T> T |
getContext() |
MergedField |
getField() |
GraphQLType |
getFieldType() |
<T> T |
getObject()
You will be passed the specific source object that needs to be resolve into a concrete graphql object type
|
GraphQLSchema |
getSchema() |
public TypeResolutionEnvironment(Object object, Map<String,Object> arguments, MergedField field, GraphQLType fieldType, GraphQLSchema schema, Object context)
public <T> T getObject()
T
- you decide what type it ispublic Map<String,Object> getArguments()
public MergedField getField()
public GraphQLType getFieldType()
GraphQLUnionType
or a
GraphQLInterfaceType
public GraphQLSchema getSchema()
public <T> T getContext()
Copyright © 2019. All rights reserved.