case class EnumType(name: String, description: Option[String], enumValues: List[EnumValue]) extends Type with NamedType with Product with Serializable
Enums are special scalars that can only have a defined set of values.
- See also
https://facebook.github.io/graphql/draft/#sec-Enum
- Alphabetic
- By Inheritance
- EnumType
- Serializable
- NamedType
- Type
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def /(pathElement: String): Path
- Definition Classes
- Type
- def <:<(other: Type): Boolean
trueif this type is a subtype ofother.trueif this type is a subtype ofother.- Definition Classes
- Type
- def =:=(other: Type): Boolean
Is this type equivalent to
other.Is this type equivalent to
other.Note that plain
==will distinguish types from type aliases, which is typically not desirable, so=:=is usually the most appropriate comparison operator.- Definition Classes
- Type
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asLeaf: Option[Type]
If the underlying type of this type is a scalar or an enum then yield it otherwise yield
None.If the underlying type of this type is a scalar or an enum then yield it otherwise yield
None.- Definition Classes
- Type
- def asNamed: Option[NamedType]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def dealias: NamedType
Strip off aliases
- val description: Option[String]
- val enumValues: List[EnumValue]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def exists: Boolean
true if a non-TypeRef or a TypeRef to a defined type
true if a non-TypeRef or a TypeRef to a defined type
- Definition Classes
- Type
- def field(fieldName: String): Option[Type]
Yield the type of the field of this type named
fieldNameorNoneif there is no such field.Yield the type of the field of this type named
fieldNameorNoneif there is no such field.- Definition Classes
- Type
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hasField(fieldName: String): Boolean
trueif this type has a field namedfieldName, false otherwise.trueif this type has a field namedfieldName, false otherwise.- Definition Classes
- Type
- def hasValue(name: String): Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isInterface: Boolean
- Definition Classes
- Type
- def isLeaf: Boolean
Is this type a leaf type?
Is this type a leaf type?
trueif after stripping of aliases the underlying type a scalar or an enum,falseotherwise.- Definition Classes
- Type
- def isList: Boolean
Is this type a list.
Is this type a list.
- Definition Classes
- Type
- def isNamed: Boolean
- def isNullable: Boolean
Is this type nullable?
Is this type nullable?
- Definition Classes
- Type
- def isUnderlyingLeaf: Boolean
Is the underlying of this type a leaf type?
Is the underlying of this type a leaf type?
Strip off all aliases, nullability and enclosing list types until an underlying leaf type is reached, in which case yield true, or an a object, interface or union type which is reached, in which case yield false.
- Definition Classes
- Type
- def isUnion: Boolean
- Definition Classes
- Type
- def item: Option[Type]
The element type of this type.
The element type of this type.
If this type is is a list, yield the non-list underlying type. Otherwise yield
None.- Definition Classes
- Type
- def list: Type
This type if it is a (nullable) list,
ListType(this)otherwise.This type if it is a (nullable) list,
ListType(this)otherwise.- Definition Classes
- Type
- val name: String
The name of this type
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nominal_=:=(other: Type): Boolean
- Definition Classes
- Type
- def nonNull: Type
A non-nullable version of this type.
A non-nullable version of this type.
If this type is nullable, yield the non-nullable underlying type. Otherwise yield this type.
- Definition Classes
- Type
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def nullable: Type
This type if it is nullable,
Nullable(this)otherwise.This type if it is nullable,
Nullable(this)otherwise.- Definition Classes
- Type
- def path(fns: List[String]): Option[Type]
Yield the type of the field at the end of the path
fnsstarting from this type, orNoneif there is no such field.Yield the type of the field at the end of the path
fnsstarting from this type, orNoneif there is no such field.- Definition Classes
- Type
- def pathIsList(fns: List[String]): Boolean
Does the path
fnsfrom this type specify multiple values.Does the path
fnsfrom this type specify multiple values.trueif navigating through the pathfnsfrom this type might specify 0 or more values. This will be the case if the path passes through at least one field of a List type.- Definition Classes
- Type
- def pathIsNullable(fns: List[String]): Boolean
Does the path
fnsfrom this type specify a nullable type.Does the path
fnsfrom this type specify a nullable type.trueif navigating through the pathfnsfrom this type might specify an optional value. This will be the case if the path passes through at least one field of a nullable type.- Definition Classes
- Type
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- NamedType → AnyRef → Any
- def underlying: Type
- Definition Classes
- Type
- def underlyingField(fieldName: String): Option[Type]
Yield the type of the field named
fieldNameof the object type underlying this type.Yield the type of the field named
fieldNameof the object type underlying this type.Strip off all aliases, nullability and enclosing list types until an underlying object type is reached which has a field named
fieldName, in which case yield the type of that field; if there is no such field, yieldsNone.- Definition Classes
- Type
- def underlyingLeaf: Option[Type]
Yield the leaf type underlying this type.
Yield the leaf type underlying this type.
Strip off all aliases, nullability and enclosing list types until an underlying leaf type is reached, in which case yield it, or an a object, interface or union type which is reached, in which case yield
None.- Definition Classes
- Type
- def underlyingObject: Option[Type]
Yield the object type underlying this type.
Yield the object type underlying this type.
Strip off all aliases, nullability and enclosing list types until an underlying object type is reached, in which case yield it, or a non-object type which isn't further reducible is reached, in which case yield
None.- Definition Classes
- Type
- def value(name: String): Option[EnumValue]
- def variantField(fieldName: String): Boolean
trueif this type has a field namedfieldNamewhich is undefined in some interface it implementstrueif this type has a field namedfieldNamewhich is undefined in some interface it implements- Definition Classes
- Type
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withField[T](fieldName: String)(body: (Type) => Result[T]): Result[T]
- Definition Classes
- Type
- def withModifiersOf(tpe: Type): Type
- Definition Classes
- Type
- def withUnderlyingField[T](fieldName: String)(body: (Type) => Result[T]): Result[T]
- Definition Classes
- Type