File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 3
3
CreateServerForIntegrationTestsOptions ,
4
4
defineIntegrationTestSuite ,
5
5
} from '@apollo/server-integration-testsuite' ;
6
+ import type { ALBEvent , ALBResult , Handler } from 'aws-lambda' ;
6
7
import { createServer } from 'http' ;
7
8
import { startServerAndCreateLambdaHandler } from '..' ;
8
9
import { createMockALBServer } from './mockALBServer' ;
@@ -23,7 +24,10 @@ describe('lambdaHandlerALB', () => {
23
24
? startServerAndCreateLambdaHandler ( server , testOptions )
24
25
: startServerAndCreateLambdaHandler ( server ) ;
25
26
26
- httpServer . addListener ( 'request' , createMockALBServer ( handler ) ) ;
27
+ httpServer . addListener (
28
+ 'request' ,
29
+ createMockALBServer ( handler as Handler < ALBEvent , ALBResult > ) ,
30
+ ) ;
27
31
28
32
await new Promise < void > ( ( resolve ) => {
29
33
httpServer . listen ( { port : 0 } , resolve ) ;
Original file line number Diff line number Diff line change @@ -36,13 +36,10 @@ export interface LambdaHandlerOptions<TContext extends BaseContext> {
36
36
context ?: ContextFunction < [ LambdaContextFunctionArgument ] , TContext > ;
37
37
}
38
38
39
- export type HandlerResult = (
39
+ export type HandlerResult =
40
40
| APIGatewayProxyStructuredResultV2
41
41
| APIGatewayProxyResult
42
- | ALBResult
43
- ) & {
44
- statusCode : number ;
45
- } ;
42
+ | ALBResult ;
46
43
47
44
type LambdaHandler = Handler < IncomingEvent , HandlerResult > ;
48
45
You can’t perform that action at this time.
0 commit comments