Object type fields mapped at the interface level and interface type fields which are implemented or overridden at the object type level are now explicitly represented internally. This allows both more efficient lookup of inherited field mappings and correct lookup of overriden field mappings.
Field mapping lookup is now more effectively indexed in TypeMappings. This might give a noticeable performance improvement for ValueMapping. Now that this indexing in centralised in TypeMappings, the per-ObjectMapping field indices have been removed. If this proves problematic for applications it could be reinstated.
Schema validation now enforces the uniqueness of interfaces in implements clauses.
Schema validation now enforces that object and interface types must directly implement all transitively implemented interfaces. The allInterfaces method on InterfaceType has been deprecated because with the preceding validation change it is equivalent to interfaces.
The Mapping-specific logic of mkCursorForField has been extracted to mkCursorForMappedField allowing simpler mapping-specific implementations.
Previously introspection did not report interfaces implemented by interfaces.
Added Schema#implementations which returns the implementing object types of an interface.
The unsafeTypeMappings constructor has been deprecated and renamed to unchecked.
TypeMappings#unsafe has been renamed to unchecked and hidden
The implementations of hasField, nullableHasField, hasPath and hasListPath in Cursor had incorrect semantics and appear to be unused, so rather than fix them, they have been removed.
Various tests have been updated to conform to the newly implemented validation rules and changes to field mapping lookup.
TypeMappings
. This might give a noticeable performance improvement forValueMapping
. Now that this indexing in centralised inTypeMappings
, the per-ObjectMapping
field indices have been removed. If this proves problematic for applications it could be reinstated.implements
clauses.allInterfaces
method onInterfaceType
has been deprecated because with the preceding validation change it is equivalent tointerfaces
.Mapping
-specific logic ofmkCursorForField
has been extracted tomkCursorForMappedField
allowing simpler mapping-specific implementations.Schema#implementations
which returns the implementing object types of an interface.unsafe
TypeMappings
constructor has been deprecated and renamed tounchecked
.TypeMappings#unsafe
has been renamed tounchecked
and hiddenhasField
,nullableHasField
,hasPath
andhasListPath
inCursor
had incorrect semantics and appear to be unused, so rather than fix them, they have been removed.