Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding in the callback to express package #463

Merged
merged 2 commits into from
Jul 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

### VNEXT

### v1.0.1
* Fix Express package not calling the callback on completion ([@chemdrew](https://github.com/chemdrew)) in [#463](https://github.com/apollographql/graphql-server/pull/463)

### v1.0.0
* Add package readmes for Express, Hapi, Koa, Restify ([@helfer](https://github.com/helfer)) in [#442](https://github.com/apollographql/graphql-server/pull/442)
* Updated & fixed typescript typings ([@helfer](https://github.com/helfer)) in [#440](https://github.com/apollographql/graphql-server/pull/440)
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lerna": "2.0.0",
"version": "1.0.0",
"version": "1.0.1",
"changelog": {
"repo": "apollostack/graphql-server",
"labels": {
Expand Down
2 changes: 2 additions & 0 deletions packages/graphql-server-express/src/expressApollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export function graphqlExpress(options: GraphQLOptions | ExpressGraphQLOptionsFu
res.setHeader('Content-Type', 'application/json');
res.write(gqlResponse);
res.end();
next();
}, (error: HttpQueryError) => {
if ( 'HttpQueryError' !== error.name ) {
return next(error);
Expand All @@ -49,6 +50,7 @@ export function graphqlExpress(options: GraphQLOptions | ExpressGraphQLOptionsFu
res.statusCode = error.statusCode;
res.write(error.message);
res.end();
next(false);
});
};
}
Expand Down