You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 16, 2019. It is now read-only.
Paweł Gutkowski edited this page Jul 28, 2017
·
2 revisions
GraphQL Unions represent an object that could be one of a list of GraphQL Object types, but provides for no guaranteed fields between those types.
unionType { }
union allows to define possible types of union. Union members have to be object types (Object or Interface). It returns reference to created union type, which is required to define properties with union return type.
Example
data classUnionMember1(valone:String)
data classUnionMember2(valtwo:String)
KgraphQL.schema {
val unionExample = unionType("UnionExample"){
type<UnionMember1>()
type<UnionMember2>()
}
}