forked from graphql-java/graphql-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypeResolver.java
More file actions
24 lines (19 loc) · 777 Bytes
/
TypeResolver.java
File metadata and controls
24 lines (19 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package graphql.schema;
import graphql.PublicSpi;
import graphql.TypeResolutionEnvironment;
/**
* This is called during type resolution to work out what concrete {@link graphql.schema.GraphQLObjectType} should be used
* dynamically during runtime for {@link GraphQLInterfaceType}s and {@link GraphQLUnionType}s
*/
@PublicSpi
public interface TypeResolver {
/**
* This call back is invoked passing in a context object to allow you to know what type to use
* dynamically during runtime for {@link GraphQLInterfaceType}s and {@link GraphQLUnionType}s
*
* @param env the runtime environment
*
* @return a graphql object type to use based on examining the environment
*/
GraphQLObjectType getType(TypeResolutionEnvironment env);
}