Skip to content

Commit

Permalink
- prettier format with @ts-ignore, for correct request context parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
psmithshine committed Jul 3, 2024
1 parent 38dc4fa commit 871a02b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/server/src/lambda.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { ApolloServer } from "@apollo/server";
import { APIGatewayProxyEvent } from "aws-lambda";
import { Env, createConfig } from "./config";
import { handlers, startServerAndCreateLambdaHandler } from "@as-integrations/aws-lambda";
import {
handlers,
startServerAndCreateLambdaHandler,
} from "@as-integrations/aws-lambda";

/**
* Create a basic server, for use with `startServerAndCreateLambdaHandler` function
Expand All @@ -25,8 +28,11 @@ export const handler = startServerAndCreateLambdaHandler(
async (event) => {
console.log("###? received event body=" + JSON.stringify(event.body));
// @ts-ignore
event.requestContext["http"] = { method: event.requestContext.httpMethod }; //have to do this otherwise error in request handler
event.requestContext["http"] = {
// @ts-ignore
method: event.requestContext.httpMethod,
}; //have to do this otherwise error in request handler
},
]
],
}
);

0 comments on commit 871a02b

Please sign in to comment.