diff --git a/packages/graphql-server-koa/src/koaApollo.ts b/packages/graphql-server-koa/src/koaApollo.ts index 9b29e9bf..c34b33e0 100644 --- a/packages/graphql-server-koa/src/koaApollo.ts +++ b/packages/graphql-server-koa/src/koaApollo.ts @@ -54,6 +54,9 @@ export function graphiqlKoa(options: GraphiQL.GraphiQLData | KoaGraphiQLOptionsF GraphiQL.resolveGraphiQLString(query, options, ctx).then(graphiqlString => { ctx.set('Content-Type', 'text/html'); ctx.body = graphiqlString; - }, error => ctx.throw(error.message, 500)); + }, error => { + ctx.status = 500; + ctx.body = error.message; + }); }; }