react-relay v5.0.0 Release Notes
Release Date: 2019-06-11 // almost 5 years ago-
Commits: v4.0.0...v5.0.0
π₯ Breaking
react-relay
containers no longer consume variables from React context, but instead from fragment owners passed through fragment refs. This means that if you have a custom QueryRenderer or other component that set Relay Context, setting variables on that context will no longer affect descendant components.
β Added
- π¦ Expose ability to pass custom scalar configuration to compiler (#2745 by @alloy)
- β Add relay-config package to manage compiler configs (#2746 by @alloy)
π Improved
- π Improved DX for working on Relay as non-FB dev (#2749 by @alloy)
- β Added Support for getDataID() function: 311412b
- β‘οΈ Updated Internal Testing Tools to explicitly mark fixtures that should throw: https://github.com/facebook/relay/commit/a6b388b598c18f83811699ef1eea00887b5d217
- β Added Memoization for Compiler Transforms:
- β‘οΈ Relay Testing Tools Update: Handle Arrays in MockResolvers
- Refetchable fragments are allowed on abstract types not directly implementing Node: 87930e1
- ID field is now automatically added to @refetchable fragments on types implementing Node: 3efecaa
π Fixed
- β
Updated default compiler configuration to include files from
__tests__
directories: 033a4bb - π Fixed a bug in flow type generation that fields on inline fragments with duplicated names are only included once:
[088afdf](https://github.com/facebook/relay/commit/088afdf347582533b9956adbc5b2a5e37fe9cfaf)
- Deduplicate connection edges based on DataID (not just id field)
- π Fixed a bug that mutations on viewer field βoverwritingβ existing fields in the store: Add hardcoded ID to
viewer
field
Misc
- π Website is moved to https://relay.dev
- β¬οΈ Upgrade Docusaurus to 1.9.0
- crossenv for jest script (#2732) by @anikethsaha