ListType

case class ListType(ofType: Type) extends Type

Lists represent sequences of values in GraphQL. A List type is a type modifier: it wraps another type instance in the ofType field, which defines the type of each item in the list.

See also:
trait Serializable
trait Type
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

override def toString: String
Definition Classes
Any

Inherited methods

def <:<(other: Type): Boolean

true if this type is a subtype of other.

true if this type is a subtype of other.

Inherited from:
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.

Inherited from:
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.

Inherited from:
Type
Inherited from:
Type

Strip off aliases

Strip off aliases

Inherited from:
Type

true if a non-TypeRef or a TypeRef to a defined type

true if a non-TypeRef or a TypeRef to a defined type

Inherited from:
Type
def field(fieldName: String): Option[Type]

Yield the type of the field of this type named fieldName or None if there is no such field.

Yield the type of the field of this type named fieldName or None if there is no such field.

Inherited from:
Type
def hasField(fieldName: String): Boolean

true if this type has a field named fieldName, false otherwise.

true if this type has a field named fieldName, false otherwise.

Inherited from:
Type
Inherited from:
Type

Is this type a leaf type?

Is this type a leaf type?

true if after stripping of aliases the underlying type a scalar or an enum, false otherwise.

Inherited from:
Type

Is this type a list.

Is this type a list.

Inherited from:
Type
Inherited from:
Type

Is this type nullable?

Is this type nullable?

Inherited from:
Type

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.

Inherited from:
Type
Inherited from:
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.

Inherited from:
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.

Inherited from:
Type
def nominal_=:=(other: Type): Boolean
Inherited from:
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.

Inherited from:
Type

This type if it is nullable, Nullable(this) otherwise.

This type if it is nullable, Nullable(this) otherwise.

Inherited from:
Type
def path(fns: List[String]): Option[Type]

Yield the type of the field at the end of the path fns starting from this type, or None if there is no such field.

Yield the type of the field at the end of the path fns starting from this type, or None if there is no such field.

Inherited from:
Type

Does the path fns from this type specify multiple values.

Does the path fns from this type specify multiple values.

true if navigating through the path fns from 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.

Inherited from:
Type

Does the path fns from this type specify a nullable type.

Does the path fns from this type specify a nullable type.

true if navigating through the path fns from 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.

Inherited from:
Type
Inherited from:
Product
Inherited from:
Type
def underlyingField(fieldName: String): Option[Type]

Yield the type of the field named fieldName of the object type underlying this type.

Yield the type of the field named fieldName of 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, yields None.

Inherited from:
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.

Inherited from:
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.

Inherited from:
Type
def variantField(fieldName: String): Boolean

true if this type has a field named fieldName which is undefined in some interface it implements

true if this type has a field named fieldName which is undefined in some interface it implements

Inherited from:
Type
def withField[T](fieldName: String)(body: Type => Result[T]): Result[T]
Inherited from:
Type
Inherited from:
Type
def withUnderlyingField[T](fieldName: String)(body: Type => Result[T]): Result[T]
Inherited from:
Type