Interface GraphQLUnionBuilder
- All Known Implementing Classes:
GraphQLUnionBuilderImpl
public interface GraphQLUnionBuilder
Builder for creating GraphQL union types.
-
Method Summary
Modifier and Type Method Description GraphQLUnionBuilder
addPossibleType(se.l4.commons.types.reflect.TypeRef type)
Add a possible type of this union.graphql.schema.GraphQLUnionType
build()
Build the union type.GraphQLUnionBuilder
over(se.l4.commons.types.reflect.TypeRef type)
Set theTypeRef
this union is based on.GraphQLUnionBuilder
setDescription(String description)
Set the description of the union.GraphQLUnionBuilder
setName(String name)
Set the name of the union.
-
Method Details
-
over
Set theTypeRef
this union is based on. Will copy name and description from the type.- Parameters:
type
-- Returns:
-
setName
Set the name of the union.- Parameters:
name
-- Returns:
-
setDescription
Set the description of the union. -
addPossibleType
Add a possible type of this union.- Parameters:
type
-- Returns:
-
build
graphql.schema.GraphQLUnionType build()Build the union type.
-