Skip to content

Commit 8e78235

Browse files
authored
Update README.md
1 parent ddf596d commit 8e78235

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ This NetworkLayer solves the following problems:
1313
Can be used in browser, react-native or node server for rendering. Under the hood this module uses global `fetch` method. So if your client is too old, please import explicitly proper polyfill to your code (eg. `whatwg-fetch`, `node-fetch` or `fetch-everywhere`).
1414

1515
Available middlewares:
16-
- **inline middleware** - your custom logic via `next => req => { /* your code */ }`.
17-
- See example below where added `credentials` and `headers` to the `fetch` method.
16+
- **custom inline middleware** - [see example](https://github.com/nodkz/react-relay-network-layer#example-of-injecting-networklayer-with-middlewares-on-the-client-side) below where added `credentials` and `headers` to the `fetch` method.
17+
- `next => req => { /* your modification of 'req' object */ return next(req); }` .
1818
- **url** - for manipulating fetch `url` on fly via thunk. Options:
1919
- `url` - string or function(req) for single request (default: `/graphql`)
2020
- `batchUrl` - string or function(req) for batch request, server must be prepared for such requests (default: `/graphql/batch`)

0 commit comments

Comments
 (0)