mirror of
https://github.com/vale981/apollo-server
synced 2025-03-06 10:11:40 -05:00
Pass ctx instead of ctx.request to koa options function
This commit is contained in:
parent
39af41c896
commit
b4b39534d8
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ export function apolloKoa(options: ApolloOptions | KoaApolloOptionsFunction): Ko
|
|||
let optionsObject: ApolloOptions;
|
||||
if (isOptionsFunction(options)) {
|
||||
try {
|
||||
optionsObject = await options(ctx.request);
|
||||
optionsObject = await options(ctx);
|
||||
} catch (e) {
|
||||
ctx.status = 500;
|
||||
return ctx.body = `Invalid options provided to ApolloServer: ${e.message}`;
|
||||
|
|
Loading…
Add table
Reference in a new issue