We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1446f89 commit d969942Copy full SHA for d969942
src/koa/koa.js
@@ -23,9 +23,7 @@ export default function middleware({ graphiql = true, schema = required() } = {}
23
}
24
25
if (isGet(this) && query && query.includes('mutation')) {
26
- this.status = 406;
27
- this.body = 'GraphQL mutation only allowed in POST request.';
28
- return this.body;
+ this.throw(406, 'GraphQL mutation only allowed in POST request.');
29
30
31
let parsedVariables = variables;
@@ -39,6 +37,6 @@ export default function middleware({ graphiql = true, schema = required() } = {}
39
37
return this.body;
40
38
41
42
- return next;
+ return yield next;
43
};
44
0 commit comments