@PublicApi public class GraphQLUnionType extends java.lang.Object implements GraphQLType, GraphQLOutputType, GraphQLCompositeType, GraphQLUnmodifiedType, GraphQLNullableType, GraphQLDirectiveContainer
TypeResolver is used to take an union object value and decide what GraphQLObjectType
represents this union of types.
Note that members of a union type need to be concrete object types; you can't create a union type out of interfaces or other unions.
See http://graphql.org/learn/schema/#union-types for more details on the concept.| Modifier and Type | Class and Description |
|---|---|
static class |
GraphQLUnionType.Builder |
| Constructor and Description |
|---|
GraphQLUnionType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLOutputType> types,
TypeResolver typeResolver) |
GraphQLUnionType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLOutputType> types,
TypeResolver typeResolver,
java.util.List<GraphQLDirective> directives,
UnionTypeDefinition definition) |
| Modifier and Type | Method and Description |
|---|---|
UnionTypeDefinition |
getDefinition() |
java.lang.String |
getDescription() |
java.util.List<GraphQLDirective> |
getDirectives() |
java.lang.String |
getName() |
TypeResolver |
getTypeResolver() |
java.util.List<GraphQLOutputType> |
getTypes() |
static GraphQLUnionType.Builder |
newUnionType() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDirective, getDirectivesByNamepublic GraphQLUnionType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLOutputType> types,
TypeResolver typeResolver)
public GraphQLUnionType(java.lang.String name,
java.lang.String description,
java.util.List<GraphQLOutputType> types,
TypeResolver typeResolver,
java.util.List<GraphQLDirective> directives,
UnionTypeDefinition definition)
public java.util.List<GraphQLOutputType> getTypes()
public TypeResolver getTypeResolver()
public java.lang.String getName()
getName in interface GraphQLType[_A-Za-z][_0-9A-Za-z]*public java.lang.String getDescription()
public UnionTypeDefinition getDefinition()
public java.util.List<GraphQLDirective> getDirectives()
getDirectives in interface GraphQLDirectiveContainerpublic static GraphQLUnionType.Builder newUnionType()