facebook / relay

Relay is a JavaScript framework for building data-driven React applications.
https://relay.dev
MIT License
18.38k stars 1.82k forks source link

Use field error events on snapshot #4798

Closed captbaritone closed 1 week ago

captbaritone commented 1 week ago

Previously we had two different object shapes which were nearly the same. One for stashing on the snapshot, and another for logging. By unifying the two shapes we simplify things a bit and avoid the transformation.

As part of this simplification, I've also removed the special case handling for snapshots which contain only missing data errors. This means we will end up with duplicate events if the snapshot is missing multiple fields. This is noisier, but perhaps more correct because it captures the fact that multiple fields were missing. Once/when/if we add runtime pathName to RelayReader, these multiple events will be even more helpful.

facebook-github-bot commented 1 week ago

@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot commented 1 week ago

@captbaritone merged this pull request in facebook/relay@55795a103c4e174da78bd26be1edb044352fddd5.