(graphcache) - Handle fields with associated GraphQLError as cache misses and provide errors to updaters (#1356)
* Add Context.path tracking the currently field alias path
* Remove active ctx.path tracking from query in production
It's not needed to track current errors from results there,
so it can alternatively be fully removed.
* Add note to ResolveInfo type on why path isn't exposed via types
* Provide the current field's GraphQLError on an updater's context
* Update docs to add information about the error field
* Overwrite null values as undefined when field has an associated error
When a field has an associated GraphQLError then the `fieldValue` should
be written as `undefined` rather than `null`.
* Replace isFieldMissing with getFieldError
* Isolate path/errorMap on context in context.__internal
This is to further hide the implementation from the user and
to ensure that sub-write methods like `updateQuery` or `writeFragment`
on the Store don't interfere with this logic as they'd build up their
own paths.
* Fix leftover global errorMap in shared.ts
* Add tests for errored fields set to undefined rather than null
* Add changeset
* Move updateContext in write.ts' updater call
* Deduplicate writeOptimistic logic with startWrite
authored by