I'm building an app with Gatsby and I'm using Gatsby Functions to obfuscate form submissions to a remote API. In this form, the user attaches a file, which can make the request exceed the default size limit of 100KB. There are other answers on StackOverflow which address this question in a node/express environment, however I cannot find how to change the limit using Gatsby.
For example, this is how to increase the limit in express:
app.use(express.json({limit: '50mb'}));
app.use(express.urlencoded({limit: '50mb'}));
How does that translate to Gatsby?
As of now, there is no way to solve this currently within Gatsby's local development environment. It uses the express.js default request size limit and there is no way to change it. However, this limit can be changed in a production environment and there is a request in to make this limit editable.