File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
import * as bodyParser from 'body-parser'
2
2
import { Request , Response , NextFunction , RequestHandler } from 'express'
3
3
4
- export const bodyParserGraphQL : ( ) => RequestHandler = ( ) => (
4
+ export interface BodyParserJSONOptions {
5
+ limit ?: number | string ,
6
+ inflate ?: boolean ,
7
+ reviver ?: any ,
8
+ strict ?: boolean ,
9
+ type ?: string ,
10
+ verify ?: any ,
11
+ }
12
+
13
+ export const bodyParserGraphQL : ( options ?: BodyParserJSONOptions ) => RequestHandler = ( options ?: BodyParserJSONOptions ) => (
5
14
req : Request ,
6
15
res : Response ,
7
16
next : NextFunction
@@ -15,7 +24,7 @@ export const bodyParserGraphQL: () => RequestHandler = () => (
15
24
next ( )
16
25
} )
17
26
} else {
18
- bodyParser . json ( ) ( req , res , next )
27
+ bodyParser . json ( options ) ( req , res , next )
19
28
}
20
29
}
21
30
You can’t perform that action at this time.
0 commit comments