v5.0.0
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