UnionType

sangria.schema.UnionType
See theUnionType companion object
case class UnionType[Ctx](name: String, description: Option[String], typesFn: () => List[ObjectType[Ctx, _]], astDirectives: Vector[Directive], astNodes: Vector[AstNode]) extends OutputType[Any], CompositeType[Any], AbstractType, NullableType, UnmodifiedType, HasAstInfo

Value parameters

description

A description of this schema element that can be presented to clients of the GraphQL service.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait HasAstInfo
trait NullableType
trait AbstractType
trait CompositeType[Any]
trait Named
trait OutputType[Any]
trait Type
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def mapValue[T](func: T => Any): OutputType[T]

Creates a type-safe version of union type which might be useful in cases where the value is wrapped in a type like Either.

Creates a type-safe version of union type which might be useful in cases where the value is wrapped in a type like Either.

Attributes

def rename(newName: String): UnionType.this.type
def withDirective(directive: Directive): UnionType[Ctx]
def withDirectives(directives: Directive*): UnionType[Ctx]

Inherited methods

Attributes

Inherited from:
Type

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
def typeOf[Ctx](value: Any, schema: Schema[Ctx, _]): Option[ObjectType[Ctx, _]]

Attributes

Inherited from:
AbstractType

Concrete fields

lazy val types: List[ObjectType[Ctx, _]]