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.