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 11import * as bodyParser from 'body-parser'
22import { Request , Response , NextFunction , RequestHandler } from 'express'
33
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 ) => (
514 req : Request ,
615 res : Response ,
716 next : NextFunction
@@ -15,7 +24,7 @@ export const bodyParserGraphQL: () => RequestHandler = () => (
1524 next ( )
1625 } )
1726 } else {
18- bodyParser . json ( ) ( req , res , next )
27+ bodyParser . json ( options ) ( req , res , next )
1928 }
2029}
2130
You can’t perform that action at this time.
0 commit comments