Skip to content

Commit

Permalink
fix(context): fix graphql parameter order
Browse files Browse the repository at this point in the history
  • Loading branch information
I committed Jul 26, 2016
1 parent 3a9121f commit d816272
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/express/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default function middleware({ graphiql = true, context = {}, schema = req
// ignore
}

return graphql(schema, query, context, request, parsedVariables)
return graphql(schema, query, { request }, context, parsedVariables)
.then((result) => {
if (result.errors) {
const message = result.errors.map((error) => error.message).join('\n');
Expand Down
2 changes: 1 addition & 1 deletion src/hapi/hapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const plugin = {
// ignore
}

return graphql(schema, query, context, request, parsedVariables)
return graphql(schema, query, { request }, context, parsedVariables)
.then((result) => {
if (result.errors) {
const message = result.errors.map((error) => error.message).join('\n');
Expand Down
2 changes: 1 addition & 1 deletion src/koa/koa.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function middleware({ graphiql = true, context = {}, schema = req
// ignore
}

this.body = yield graphql(schema, query, context, this, parsedVariables);
this.body = yield graphql(schema, query, { request: this.request }, context, parsedVariables);
return this.body;
}

Expand Down

0 comments on commit d816272

Please sign in to comment.