Releases: relay-tools/react-relay-network-modern
Releases · relay-tools/react-relay-network-modern
v2.3.4
v2.3.3
v2.3.2
v2.3.1
v2.3.0
v2.2.0
v2.1.2
v2.1.1
v2.1.0
v2.0.0
2.0.0 (2018-03-03)
New
- add
beforeFetch
option toRelayNetworkLayer(middlewares, { beforeFetch })
. (c4b6f2c)
Code Refactoring
- rename
gqlErrorsMiddleware
toerrorMiddleware
(5a5c3f5)
BREAKING CHANGES
- renamed
gqlErrorsMiddleware
toerrorMiddleware
subscribeFn
should be provided as named option
Migration guide from v1 to v2
1. Rename gqlErrorsMiddleware
to errorMiddleware
- import { RelayNetworkLayer, gqlErrorsMiddleware } from 'react-relay-network-modern';
+ import { RelayNetworkLayer, errorMiddleware } from 'react-relay-network-modern';
- const network = new RelayNetworkLayer([ gqlErrorsMiddleware() ]);
+ const network = new RelayNetworkLayer([ errorMiddleware() ]);
2. If you use subscriptions provide subscribeFn
as named option:
- const network = new RelayNetworkLayer(middlewares, subscribeFn);
+ const network = new RelayNetworkLayer(middlewares, { subscribeFn });