File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,7 +54,10 @@ export function getServeCommand<Configuration, State>(
5454 new Option ( "--service-token-secret <secret>" ) . env ( "HASURA_SERVICE_TOKEN_SECRET" )
5555 )
5656 . addOption ( new Option ( "--log-level <level>" ) . env ( "HASURA_LOG_LEVEL" ) . default ( "info" ) )
57- . addOption ( new Option ( "--pretty-print-logs" ) . env ( "HASURA_PRETTY_PRINT_LOGS" ) . default ( false ) ) ;
57+ . addOption ( new Option ( "--pretty-print-logs" ) . env ( "HASURA_PRETTY_PRINT_LOGS" ) . default ( false ) )
58+ . addOption (
59+ new Option ( "--body-limit <bytes>" ) . env ( "HASURA_BODY_LIMIT" ) . default ( 31457280 ) . argParser ( parseIntOption )
60+ ) ;
5861
5962 if ( connector ) {
6063 command . action ( async ( options : ServerOptions ) => {
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ export interface ServerOptions {
7979 serviceTokenSecret : string | undefined ;
8080 logLevel : string ;
8181 prettyPrintLogs : string ;
82+ bodyLimit : number | undefined ;
8283}
8384
8485const tracer = opentelemetry . trace . getTracer ( "ndc-sdk-typescript.server" ) ;
@@ -134,7 +135,7 @@ export async function startServer<Configuration, State>(
134135
135136 const server = Fastify ( {
136137 logger : configureFastifyLogging ( options ) ,
137- bodyLimit : 1048576 * 30 , // 30mb body limit
138+ bodyLimit : options . bodyLimit ?? 1048576 * 30 , // 30mb body limit
138139 ajv : {
139140 customOptions : customAjvOptions ,
140141 } ,
You can’t perform that action at this time.
0 commit comments