react-relay v6.0.0 Release Notes

Release Date: 2019-09-16 // over 4 years ago
  • Commits: v5.0.0...v6.0.0

    ๐Ÿ’ฅ Breaking

    • ๐Ÿ‘€ Environment no longer supports a configurable PublishQueue, this is a prerequisite for upcoming changes to support a new connection representation and the Store interface changes (see below): 44edf14
    • โšก๏ธ Changed the Store interface, adding snapshot() and restore() methods and changing the way that PublishQueue/Store coordinate to revert/rebase optimistic updates: a5c903d
      • Note: this should have no impact on users who use the default Store implementation; the main impact is to alternate store implementations and consumers thereof.
    • โœ‚ Removed the unused RecordSource interface load() method: bd15d4e
    • Changed dataFrom prop in ReactRelayQueryRenderer to fetchPolicy, changed 'STORE_THEN_NETWORK' to 'store-and-network'.
    • ๐Ÿ”„ Changed $key in flow type for plural fragments to plural ($ReadOnlyArray<>)
    • ๐Ÿšš environment.unstable_internal has been removed, since we no longer need to support Relay Compat.
    • Minimum required React version is now 16.9.0

    โž• Added

    • Added _ unreleased _ relay-experimental package which contains experimental version of Relay Hooks using React Suspense.
    • โž• Added a LocalQueryRenderer that has the same API as QueryRenderer, and only renders from data in the store.
    • @inline directive and readInlineData() function that enables data masking for functions instead of React components.
    • Added an @raw_response_type directive on query, mutation and subscription. With the directive, a new flow type will be added to the generated artifact that represents the shape of the server response.
    • ๐Ÿ†• New documentation for Client Schema extensions and managing local data was added.

    ๐Ÿ‘Œ Improved

    • Validate that required arguments are provided in compiler.
    • ๐Ÿ“ฆ Don't include (70453f2) @babel (https://github.com/babel) packages in generated bundles ( (70453f2#2764#2764) (#2764)) (70453f2)
    • ๐ŸŽ Made several performance optimizations for our compiler transforms.
    • ๐Ÿ‘ Allow RelayFileWriter to specify the filesystem object (#2837)
    • ๐Ÿ”ง Can now configure persistFunction with relay config.

    ๐Ÿ›  Fixed

    • ๐Ÿคก Various fixes to the MockPayloadGenerator
      • Added test case for mocking null values (#2762 (#2762))
      • Fixed MockResolvers for Objects in plural fields
      • Fixed generated values for scalar arrays/enums
      • Fixed mock resolvers for arrays of Enums (#2779 (#2779))
      • Handle cases when MockResolver for ID returning undefined
    • ๐Ÿ›  Fix edge case in ConnectionHandler when field is unset
    • ๐Ÿ›  Fixed relay-compiler babel polyfill problem.
    • ๐Ÿ‘‰ Use reporter to report changes (#2838)
    • ๐Ÿ‘‰ Use global state for persisted queries to fix --watch (#2625 (#2625))

    Misc

    • v6.0.0 should now be compatible with React 16.9.0.
    • ๐Ÿ‘ Experimental: work-in-progress support for a new approach to representing connections, with changes starting in 6f01295. The new connection representation is not feature complete and disabled by a feature flag. The APIs are highly likely to change.
    • โž• Added a new implementation of the RelayRecordsSource (available behind a feature flag)