Minor Changes
- Allow scalar values on the parent to be accessed from
parent[info.fieldName]
consistently. Prior to this changeparent[fieldAlias]
would get populated, which wouldn’t always result in a field that’s consistently accessible
Submitted by @kitten (See #3336) - Allow
cache.resolve
to returnundefined
when a value is not cached to make it easier to cause a cache miss in resolvers. Reminder: Returningundefined
from a resolver means a field is uncached, while returningnull
means that a field’s value isnull
without causing a cache miss
Submitted by @kitten (See #3333)
Patch Changes
- Record a dependency when
__typename
field is read. This removes a prior, outdated exception to avoid confusion when usingcache.resolve(entity, '__typename')
which doesn't cause the cache to record a dependency
Submitted by @kitten (See #3335) - ⚠️ Fix cases where
ResolveInfo
’sparentFieldKey
was incorrectly populated with a key that isn’t a field key (allowing forcache.resolve(info.parentKey, info.parentFieldKey)
to be possible) but was instead set toinfo.parentKey
combined with the field key
Submitted by @kitten (See #3336)