react-relay v8.0.0 Release Notes

Release Date: 2019-12-19 // over 2 years ago
  • 8.0.0

    ๐Ÿš€ Previous Release Notes: 8.0.0
    Commits: v7.1.0...v8.0.0

    ๐Ÿ’ฅ Breaking

    • ๐Ÿ“œ Relay Compiler no longer relies on the graphql-js schema representation. And consumes only SDL file that represents the schema. This means that all custom implementations relay compiler runners that were depended on the specifics of the graphql-js may not work as expected. Specifically, custom Enum values are no longer available in the relay-compiler - as they cannot be expressed via SDL. Also, custom function parseValue, parseLiteral and serialize that can be defined for a graphql type via graphql-js primitives are not accessible in the relay compiler: this may break serialization of custom scalars. 860c23c
    • ๐Ÿ”Œ Babel plugin no longer produces thunks: 490c89d
    • Mutations are committed to unique root ids #2349. In mutation updaters, fields in the mutation will no longer be available in the store root returned from store.getRoot. Usages like store.getRoot().getLinkedRecord('create_comment_mutation') will break.
    • โœ‚ Removed internally unused RelayRecordSourceProxy::commitPayload(). Note that this method was not part of the public interface.

    โž• Added

    • ๐Ÿ‘ Allow language plugin to add schema extensions. #2935
    • ๐Ÿ‘ In relay-compiler we added support for variables in complex objects and arrays: 5da3be0
    • isClientID helper is available to use in relay-runtime dac614c

    ๐Ÿ›  Fixed

    โœ‚ Remove the clientMutationId requirement by creating a new root id for each executed mutation: #2349

    ๐Ÿ›ฐ validateMutation correctly handles lists of scalar fields in the optimistic payloads: 56795ba

    DissalowIDAsAlias this validation had a bug, there it wasn't traversing LinkedFields, hence wasn't reporting violations in their selections. c4547f9

    RelayModernFragmentSpecResolver only holds on to fragment references as opposed to all props passed to product code to reduce amount of leaked memory when rendering in React concurrent mode.

    ๐Ÿ›  Fixed detecting whether the execution environment is a server: #2960


    • Relay codebase is using explicit inexact objects: 4e2cc2f
    • โž• Added an options property on IEnvironment for attaching extra information to the environment instance
    • โšก๏ธ Updated docs to consider Relay server specifications GraphQL best practices and not purely a Relay spec: #2603
    • has a new landing page redesign: #2953


    • Data Invalidation: Added new Data Invalidation primitives to allow marking data in the Relay Store as stale. When data is marked as stale, queries that reference that data will also be stale; stale queries will indicate to Relay that they need to be refetched the next time they are evaluated.
    • ๐Ÿ—„ Deprecate LazyLoadEntryPointContainer => LazyLoadEntryPointContainer_DEPRECATED: 08bde91
    • โœ‚ Removed Unused types from RelayStoreTypes 76354e9
    • usePrelaodedQuery now takes an unstable UNSTABLE_renderPolicy like useLazyLoadQuery: fc1b88b
    • useMutation Hook was added: 96d9703
    • Export a JSResource Flow interface from Relay.
    • ๐Ÿ›  Fixed subscribing to plural fragments with missing data when using useFragment.