- Eliminated a race condition that would cause
RelayGarbageCollectorto fatal when, in the middle of areadRelayDiskCachetraversal, a container attempts to subscribe to a record not yet registered with the garbage collector. - The garbage collector now strictly increments references to all subscribed nodes, and strictly decrements references to all previously subscribed nodes, eliminating a class of race condition by ensuring an exact 1:1 correspondence of increment/decrement calls for a given node.
- Replaced
GraphQLStoreDataHandlerwithRelayRecord, and added theRelayRecord#isRecordmethod. - Introduced
RelayQueryIndexPathwhich tracks fragment indexes to the nearest parent field during query traversal. This replaces the existing logic used to generate field serialization keys. - Added
RelayContext, a step toward making all Relay state contextual. - Improved query printing performance via short circuiting and inlining.
- Moved record writing functions out of
RelayRecordStoreand into a newRelayRecordWriterclass. - The Babel plugin now prints
canHaveSubselectionsmetadata on object-like fields that can contain child fields, making it possible to determine if a given field in a query is a true leaf node, or an object-type field having no subselections. This replacesRelayQueryNode#isScalarwithRelayQueryNode#canHaveSubselections. RANGE_DELETEmutation configs now allow you to specify an array path to a deleted node, rather than just adeletedIDFieldName.- Renamed
RecordstoRecordMap. - Record reads from cache managers are now abortable. If the network request finishes before the cache read, for instance, the cache read can be cancelled.
- Added USERS.md; a catalog of products and developers that use Relay.
- You can now interpolate an array of fragments into a
Relay.QLquery. eg.${containers.map(c => c.getFragment('foo'))} - Fixed a bug where invalid queries could be printed due to different variables having the same value; duplicates are now avoided.