This package publishing automated by semantic-release. Changelog is generated automatically and can be found here: https://github.com/relay-tools/react-relay-network-layer/releases
- feat(Mutation): Add support to multiple files upload relay#586. #38 (thanks to @giautm)
- fix(Auth middleware): Only first request that failed during tokenRefresh was retries. #37 (thanks to @alexxv)
- chore(Packages): Update dev packages. Add yarn.
- Auth middleware: when client makes multiples relay requests with expired token, we only need to refresh token once for those requests. #32 (thanks to @alexxv)
- Configurable header name for auth middleware #28 (thanks to @tehwalris)
For
auth
middleware addedheader
option: name of the HTTP header to pass the token in (default:'Authorization'
).
- Fix
formatRequestErrors
for Absinthe (GraphQL for Elixir) #27 (thanks to @redjohn)
- Catch unhandled promises, (closes #7 Red screen for react-native when network problem occurs).
- Add tests.
- Remove unnecessary wrapping Promise.
- Handle malformed or non existent JSON in response (#20). Thanks to @JonathanUsername
- Return main promise. Thanks to @helfer graphql/express-graphql#99 Returning the main promise will let you do things like time execution and perform some cleanups after the request is processed.
- fix: support
[email protected]
. Thanks @genbit issue #19
- fix: batch express middleware. It should not call next middleware. Thanks @genbit issue #13
- fix: gqErrors middleware, it does not display errors for single request (thanks to @jibingeo)
- fix: catch react-native error, when network request fails, eg. offline (issue #7).
- fix: remove
whatwg-fetch
polyfill, due problem in React Native (issue #8).
If your client does not have fetch
global method, you should include polyfill explicitly in you code:
import 'whatwg-fetch'; // for old browsers
or;
import 'node-fetch'; // for old node versions
or;
import 'fetch-everywhere'; // fresh isomorphic fetch polyfill, that supports all clients (not tested ;)
Thanks to @roman01la and @edvinerikson.
- feat: add
allowEmptyToken
option forauthMiddleware
to allow made a request without Authorization header if token is empty
- fix: files upload with auth middleware (thanks to @alexanderlamb)
- feat: improve performance of
graphqlBatchHTTPWrapper
, by removing JSON.parse
- fix: add support for [email protected]
- feat: Add
json
param toresponse
. Now it's available for middleware in bubbling phase (res.json). - feat: new middleware
gqErrors
- displayerrors
data to console from graphql response - experimental:
deferMiddleware
, right now it's only inform Relay that NetworkLayer support this feature. See discussion aboutdefer
here relay/issues/288
- feat: improved
retryMiddleware
with thunk retries delays and force fetch
- feat: New
retryMiddleware
for request retry if the initial request fails (thanks to @mario-jerkovic) - fix:
authMiddleware
which pass lowercased headerAuthorization
- docs: Prepare
README.md
for npmjs.com
- Initial public release