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 thegraphql-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 functionparseValue
,parseLiteral
andserialize
that can be defined for a graphql type viagraphql-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 likestore.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 inrelay-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: 56795baDissalowIDAsAlias
this validation had a bug, there it wasn't traversing LinkedFields, hence wasn't reporting violations in their selections. c4547f9RelayModernFragmentSpecResolver
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
Misc
- Relay codebase is using explicit inexact objects: 4e2cc2f
- โ Added an
options
property onIEnvironment
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
- https://relay.dev has a new landing page redesign: #2953
Experimental
- 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 unstableUNSTABLE_renderPolicy
likeuseLazyLoadQuery
: fc1b88buseMutation
Hook was added: 96d9703- Export a
JSResource
Flow interface from Relay. - ๐ Fixed subscribing to plural fragments with missing data when using
useFragment
.
- ๐ Relay Compiler no longer relies on the