github facebook/relay v2.0.0-rc.1

latest releases: v18.1.0, v18.0.0, v17.0.0...
pre-release6 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.

Don't miss a new relay release

NewReleases is sending notifications on new releases.