react-relay v2.0.0-rc.1 Release Notes
Release Date: 2018-10-31 // over 5 years ago-
Commits: v1.7.0-rc.1...v2.0.0-rc.1
๐ฅ Breaking
- ๐ Relay now uses new Context API instead of Legacy Context API. Any consumers of Relay context using the Legacy context API will break.
- Although not officially supported, this change also breaks SSR with Relay: #2544. We will fix this issue in 2.0.0-rc.2.
- โ Removed experimental support for @deferrable directive
- โฌ๏ธ Upgrade graphql to 14.0.0
- โฌ๏ธ Upgrade react to 16.5.0
- relay-compiler: Rename inputFieldWhitelist to optionalInputFields.
โ Added
- โ Add 'severity' field to PayloadError in RelayNetwork interface.
- โ Add support for specifying missingFieldHandlers in the Relay environment. These handlers allow developers to provide a fallback for missing data for a query when environment.check() is called.
- โ Add support making GC scheduling configurable in the Relay environment.
- ๐ Allow passing a custom handler to @connection. This is useful for products that want to customize the way newly fetched items are merged into an existing connection.
Experimental
โ Added a new
relay-experimental
package which exposes a few experimental APIs.- โ Add fetchQuery_UNSTABLE api to fetch and retain data outside of React.
- โ Add SuspenseQueryRenderer and SuspenseFragmentContainer. These are new versions of our containers that use Suspense to communicate loading states.
๐ Fixed
- ๐ Fix incorrectly garbage collecting data during an optimistic update.
- Correctly fix double fetching with QueryRenderer in React Concurrent mode.
- ๐ Fix rendering sibling QueryRenderers that have the same query and variables.
๐ Improved
- โฌ๏ธ Upgrade build dependencies to Babel 7 and Webpack 4.
- ๐ Make generated Flow types for Input types exact objects.
- ๐ฐ Simplify structure of network payloads.
- ๐ Rename RelayMarkSweepStore to RelayModernStore.
- ๐ Relay now uses new Context API instead of Legacy Context API. Any consumers of Relay context using the Legacy context API will break.