Skip to content

Commit

Permalink
add support for [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
nodkz committed May 27, 2016
1 parent df3ffd5 commit a20e98f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## master

## 1.1.1 (May 27, 2016)
* fix: add support for [email protected]

## 1.1.0 (May 17, 2016)

* feat: Add `json` param to `response`. Now it's available for middleware in bubbling phase (res.json).
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.1.0",
"version": "1.1.1",
"description": "Network Layer for React Relay and Express (Batch Queries, AuthToken, Logging, Retry)",
"files": [
"es",
Expand Down
11 changes: 9 additions & 2 deletions src/express-middleware/graphqlBatchHTTPWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ export default function (graphqlHTTPMiddleware) {
body: data,
};
const subResponse = {
status(st) { this._status = st; return this; },
status(st) { this.statusCode = st; return this; },
set() { return this; },
send(payload) {
resolve({ status: this._status, id: data.id, payload });
resolve({ status: this.statusCode, id: data.id, payload });
},

// support [email protected]
setHeader() { return this; },
write(payload) { this.payload = payload; },
end() {
resolve({ status: this.statusCode, id: data.id, payload: this.payload });
},
};
subResponses.push(subResponse);
Expand Down

0 comments on commit a20e98f

Please sign in to comment.