@@ -22,6 +22,11 @@ export type IncomingEvent =
22
22
| APIGatewayProxyEventV2
23
23
| ALBEvent ;
24
24
25
+ /**
26
+ * @deprecated Use {IncomingEvent} instead
27
+ */
28
+ export type GatewayEvent = IncomingEvent ;
29
+
25
30
export interface LambdaContextFunctionArgument {
26
31
event : IncomingEvent ;
27
32
context : Context ;
@@ -70,7 +75,7 @@ export function startServerAndCreateLambdaHandler<TContext extends BaseContext>(
70
75
71
76
return async function ( event , context ) {
72
77
try {
73
- const normalizedEvent = normalizeGatewayEvent ( event ) ;
78
+ const normalizedEvent = normalizeIncomingEvent ( event ) ;
74
79
75
80
const { body, headers, status } = await server . executeHTTPGraphQLRequest ( {
76
81
httpGraphQLRequest : normalizedEvent ,
@@ -98,7 +103,7 @@ export function startServerAndCreateLambdaHandler<TContext extends BaseContext>(
98
103
} ;
99
104
}
100
105
101
- function normalizeGatewayEvent ( event : IncomingEvent ) : HTTPGraphQLRequest {
106
+ function normalizeIncomingEvent ( event : IncomingEvent ) : HTTPGraphQLRequest {
102
107
let httpMethod : string ;
103
108
if ( 'httpMethod' in event ) {
104
109
httpMethod = event . httpMethod ;
@@ -110,7 +115,6 @@ function normalizeGatewayEvent(event: IncomingEvent): HTTPGraphQLRequest {
110
115
if ( 'rawQueryString' in event ) {
111
116
search = event . rawQueryString ;
112
117
} else if ( 'queryStringParameters' in event ) {
113
- event . queryStringParameters ;
114
118
search = normalizeQueryStringParams (
115
119
event . queryStringParameters ,
116
120
event . multiValueQueryStringParameters ,
0 commit comments