Skip to content

Commit

Permalink
Bump version 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nodkz committed May 4, 2016
1 parent bc9c701 commit 39f715c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## master

## 1.0.2 (May 4, 2015)
## 1.0.2 (May 4, 2016)

* feat: New `retryMiddleware` for request retry if the initial request fails (thanks to @mario-jerkovic)
* fix: `authMiddleware` which pass lowercased header `Authorization`

## 1.0.1 (April 25, 2015)
## 1.0.1 (April 25, 2016)

* docs: Prepare `README.md` for npmjs.com

Expand Down
25 changes: 11 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,22 @@ Main purpose to use this NetworkLayer:
- If your app should manipulate request on the fly - log them, change or made some fallbacks if request fails

Available middlewares:
- **auth** - for adding auth token, and refreshing it if gets 401 response from server.
`options`:
- **url** - for manipulating fetch `url` on fly via thunk. Options:
* `url` - string or function(req) for single request (default: `/graphql`)
* `batchUrl` - string or function(req) for batch request, server must be prepared for such requests (default: `/graphql/batch`)
- **retry** - for request retry if the initial request fails. Options:
* `fetchTimeout` - number in milliseconds that defines in how much time will request timeout after it has been sent to the server (default: `15000`).
* `retryDelays` - array of millisecond that defines the values on which retries are based on (default: `[1000, 3000]`).
* `statusCodes` - array of XMLHttpRequest status codes which will fire up retryMiddleware (default: `status < 200 or status > 300`).
- **auth** - for adding auth token, and refreshing it if gets 401 response from server. Options:
* `token` - string or function(req) which returns token. If function is provided, then it will be called for every request (so you may change tokens on fly).
* `tokenRefreshPromise`: - function(req, err) which must return promise with new token, called only if server returns 401 status code and this function is provided.
* `prefix` - prefix before token (default: `'Bearer '`)
- **url** - for manipulating fetch `url` on fly via thunk
`options`:
* `url` - string or function(req) for single request (default: `/graphql`)
* `batchUrl` - string or function(req) for batch request, server must be prepared for such requests (default: `/graphql/batch`)
- **logger** - for logging requests and responses
`options`:
- **logger** - for logging requests and responses. Options:
* `logger` - log function (default: `console.log.bind(console, '[RELAY-NETWORK]')`)
- **perf** - simple time measure for network request
- **perf** - simple time measure for network request. Options:
* `logger` - log function (default: `console.log.bind(console, '[RELAY-NETWORK]')`)
- **retry** - for request retry if the initial request fails
`options`:
* `fetchTimeout` - number in milliseconds that defines in how much time will request timeout after it has been sent to the server (default: `15000`).
* `retryDelays` - array of millisecond that defines the values on which retries are based on (default: `[1000, 3000]`).
* `statusCodes` - array of XMLHttpRequest status codes which will fire up retryMiddleware (default: `status < 200 or status > 300`).


[CHANGELOG](https://github.com/nodkz/react-relay-network-layer/blob/master/CHANGELOG.md)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-relay-network-layer",
"version": "1.0.1",
"version": "1.0.2",
"description": "Network Layer for React Relay and Express (Batch Queries, AuthToken, Logging)",
"files": [
"es",
Expand Down

0 comments on commit 39f715c

Please sign in to comment.