Types
object Types
Value members
Concrete methods
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.
def makeEnum(name: Option[String], description: Option[String], values: List[`__EnumValue`], origin: Option[String]): `__Type`
def makeInputObject(name: Option[String], description: Option[String], fields: List[`__InputValue`], origin: Option[String]): `__Type`
def makeInterface(name: Option[String], description: Option[String], fields: () => List[`__Field`], subTypes: List[`__Type`], origin: Option[String]): `__Type`
def makeObject(name: Option[String], description: Option[String], fields: List[`__Field`], directives: List[Directive], origin: Option[String]): `__Type`
Tries to find a common widened type among a list of types.
Tries to find a common widened type among a list of types.
- Value Params
- l
a list of types to unify
- Returns
the unified type if one could be found
- Example
unify(List(string, makeNonNull(string))) // => Some(__Type(SCALAR, Some("String")))
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 Params
- t1
type second type to unify
- t2
the first type to unify
- Returns
the unified type if one could be found
- Example
unify(string, makeNonNull(string)) // => Some(__Type(SCALAR, Some("String")))