Skip to content

Commit 537eb7e

Browse files
committed
Fixed missed regression
1 parent 74666b4 commit 537eb7e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ export type IncomingEvent =
2222
| APIGatewayProxyEventV2
2323
| ALBEvent;
2424

25+
/**
26+
* @deprecated Use {IncomingEvent} instead
27+
*/
28+
export type GatewayEvent = IncomingEvent;
29+
2530
export interface LambdaContextFunctionArgument {
2631
event: IncomingEvent;
2732
context: Context;
@@ -70,7 +75,7 @@ export function startServerAndCreateLambdaHandler<TContext extends BaseContext>(
7075

7176
return async function (event, context) {
7277
try {
73-
const normalizedEvent = normalizeGatewayEvent(event);
78+
const normalizedEvent = normalizeIncomingEvent(event);
7479

7580
const { body, headers, status } = await server.executeHTTPGraphQLRequest({
7681
httpGraphQLRequest: normalizedEvent,
@@ -98,7 +103,7 @@ export function startServerAndCreateLambdaHandler<TContext extends BaseContext>(
98103
};
99104
}
100105

101-
function normalizeGatewayEvent(event: IncomingEvent): HTTPGraphQLRequest {
106+
function normalizeIncomingEvent(event: IncomingEvent): HTTPGraphQLRequest {
102107
let httpMethod: string;
103108
if ('httpMethod' in event) {
104109
httpMethod = event.httpMethod;
@@ -110,7 +115,6 @@ function normalizeGatewayEvent(event: IncomingEvent): HTTPGraphQLRequest {
110115
if ('rawQueryString' in event) {
111116
search = event.rawQueryString;
112117
} else if ('queryStringParameters' in event) {
113-
event.queryStringParameters;
114118
search = normalizeQueryStringParams(
115119
event.queryStringParameters,
116120
event.multiValueQueryStringParameters,

0 commit comments

Comments
 (0)