v1.5.0
This release introduces several changes, some of the most relevant ones are highlighted here.
New:
- Relay Containers are now Flow typed, however Flow types are not yet exported (#2284).
- Relay Compiler now generates Flow types for GraphQL enum values.
- Add undocumented support for client-only schema extensions using
.graphql
files. Extensions only work on existing types, and does not currently support adding client-only types to the schema. - Add experimental and undocumented support for QueryRenderer to render directly from store if data is available using new
dataFrom
prop. - Add hooks to enable and disable Relay GC in the store.
- New
ConcreteNode
format supporting Batch requests.
Potentially Breaking:
- Support for client-only schema extensions requires that your GraphQL schema not be inside your the directory you specify as
src
to therelay-compiler
(#2346). - Changes the type of
RelayNetwork.execute
to return aRelayObservable
withvariables
andnode
, in addition to theQueryPayload
. However,RelayNetwork.create
maintains the same API (c058ffc).
Fixed:
- Fix passing a single item to a "list" input argument (42c1119).
- Fix end cursor when fetch returned zero edges in Pagination Container (a17b462).
- No longer throw false alarm error in
RelayConcreteVariables
(0398585). - Properly handle complex GraphQL argument literals in the compiler (bb02769).
- Calling viewer handler multiple times should not accidentally cause viewer to be null (f442fcd).
- Fix issue when using multiple connectionInfo for
RANGE_ADD
mutation (7f2013d). - Fix issue in Relay Compiler when parsing non-null input (4baa970).
- Fix pagination on empty connections (62c8b43).
Improved:
- Ensure the Relay build has run and is not using outdated GraphQL fragments. Optionally this can be turned off in the babel plugin settings (a628637).
- Update all callers of react-relay to use CommonJS requires.
- Speed up
getIdentifierForSelection
. - Compiler doesn't warn on missing fields with abstract types anymore.
- Relay Compiler now de-duplicates identical objects when generating JSON artifacts which decreases size of artifacts and improves compressability.
- Disable
NoFragmentCyclesRule
; can now use Fragments recursively. - Remove
RecordSourceInspector
which is of marginal value, especially now that we have a useful devtools app. - Print timing information in compiler —verbose mode.
- Add option to Compiler to be
—quiet
. - Upgrade to graphql-js v0.13.0.
- Upgrade to latest version of fast-glob.
- Upgrade to babylon7 in Relay Compiler to support new JSX Fragment syntax.
- Remove
graphql.experimental
. - Several Flow typing improvements.
- Several documentation fixes.
- Move test utils to their own package: relay-test-utils.
- Add support for accessing Components wrapped in a Container in tests.
- Use jest snapshots for relay-compiler tests.