Types

caliban.schema.Types
object Types

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Types.type

Members list

Value members

Concrete methods

def collectTypes(t: `__Type`, existingTypes: List[`__Type`] = ...): List[`__Type`]

Returns a map of all the types nested within the given root type.

Returns a map of all the types nested within the given root type.

Attributes

def makeEnum(name: Option[String], description: Option[String], values: List[`__EnumValue`], origin: Option[String], directives: Option[List[Directive]] = ...): `__Type`
def makeField(name: String, description: Option[String], arguments: List[`__InputValue`], `type`: () => `__Type`, isDeprecated: Boolean = ..., deprecationReason: Option[String] = ..., directives: Option[List[Directive]] = ...): `__Field`
def makeInputObject(name: Option[String], description: Option[String], fields: List[`__InputValue`], origin: Option[String] = ..., directives: Option[List[Directive]] = ...): `__Type`
def makeInterface(name: Option[String], description: Option[String], fields: () => List[`__Field`], subTypes: List[`__Type`], origin: Option[String] = ..., directives: Option[List[Directive]] = ...): `__Type`
def makeObject(name: Option[String], description: Option[String], fields: List[`__Field`], directives: List[Directive], origin: Option[String] = ..., interfaces: () => Option[List[`__Type`]] = ...): `__Type`
def makeScalar(name: String, description: Option[String] = ..., specifiedBy: Option[String] = ..., directives: Option[List[Directive]] = ...): `__Type`

Creates a new scalar type with the given name.

Creates a new scalar type with the given name.

Attributes

def makeUnion(name: Option[String], description: Option[String], subTypes: List[`__Type`], origin: Option[String] = ..., directives: Option[List[Directive]] = ...): `__Type`
def name(t: `__Type`): String
def same(t1: `__Type`, t2: `__Type`): Boolean

Tries to find a common widened type among a list of fields.

Tries to find a common widened type among a list of fields.

Value parameters

l

a list of fields to unify

Attributes

Returns

the unified type if one could be found

Tries to unify two types by widening them to a common supertype.

Tries to unify two types by widening them to a common supertype.

Value parameters

t1

type second type to unify

t2

the first type to unify

Attributes

Returns

the unified type if one could be found

Example
unify(string, makeNonNull(string)) // => Some(__Type(SCALAR, Some("String")))

Concrete fields

val int: `__Type`
val long: `__Type`