Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase the size limit of the request's body #285

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/postgraphql/http/createPostGraphQLHttpRequestHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,14 @@ export default function createPostGraphQLHttpRequestHandler (options) {
// want that.
const bodyParserMiddlewares = [
// Parse JSON bodies.
bodyParser.json(),

// Limit: Controls the maximum request body size. If this is a number,
// then the value specifies the number of bytes; if it is a string,
// the value is passed to the bytes library for parsing.
// Defaults to '100kb'
bodyParser.json({ limit: '50mb' }),
// Parse URL encoded bodies (forms).
bodyParser.urlencoded({ extended: false }),
bodyParser.urlencoded({ extended: false, limit: '50mb' }),
// Parse `application/graphql` content type bodies as text.
bodyParser.text({ type: 'application/graphql' }),
]
Expand Down