TypeComparators
in package
Table of Contents
- isEqualType() : bool
- Provided two types, return true if the types are equal (invariant).
- isTypeSubTypeOf() : bool
- Provided a type and a super type, return true if the first type is either equal or a subset of the second super type (covariant).
- areSameBuiltInScalar() : bool
- Built-in scalars may exist as different instances when a type loader overrides them. Compare by name to handle this case.
Methods
isEqualType()
Provided two types, return true if the types are equal (invariant).
public
static isEqualType(Type $typeA, Type $typeB) : bool
Parameters
Return values
bool —isTypeSubTypeOf()
Provided a type and a super type, return true if the first type is either equal or a subset of the second super type (covariant).
public
static isTypeSubTypeOf(Schema $schema, Type $maybeSubType, Type $superType) : bool
Parameters
Tags
Return values
bool —areSameBuiltInScalar()
Built-in scalars may exist as different instances when a type loader overrides them. Compare by name to handle this case.
private
static areSameBuiltInScalar(Type $typeA, Type $typeB) : bool
