title: Increasing body limit size in apollo-server-express
body: <p>I am trying to upload files to a webservice using the Upload scalar in apollo-server-express. I can upload small files(10s of kbs) to the webservice but am having trouble getting larger files to send. </p>
  
  <p>I did some searching and found that I can change the body size limit using the body-parser package, along with the bodyParserConfig option set in middleware. I've tried implementing this, as well as implementing it in the express app itself, however neither seem to be working.</p>
  
  <p>bodyParserConfig example snippet</p>
  
  <pre><code>const bodyParserConfig = bodyParser.urlencoded({limit: '50mb', extended: 'true', parameterLimit: 10000});
  
  
  server.applyMiddleware({ app, path: process.env.GRAPHQL_ENDPOINT, bodyParserConfig});
  </code></pre>
  
  <p>I'm not sure if I need to use the json method as inside the apollo service it calls json(config) so I tried this and it also didnt work.</p>
  
  <pre><code>const bodyParserConfig = {limit: '50mb'};
  
  
  server.applyMiddleware({ app, path: process.env.GRAPHQL_ENDPOINT, bodyParserConfig});
  
  </code></pre>
  
  <p>express example snippit</p>
  
  <pre><code>app.use(bodyParser.json({limit: '50mb'}))
  </code></pre>
  
  <p>Trying out both of these options, as well as options from <a href="https://stackoverflow.com/questions/19917401/error-request-entity-too-large/19965089#19965089">Error: request entity too large</a> don't seem to work for me. The webservice(Nifi HTTPHandleRequest) tells me it failed to receive content. Most examples of solutions(like the one above) have been specifically for express and not apollo-express-server so I'm not sure if theres a different approach I need to take. The apollo-server documents state to use the bodyParserConfig option, so I'm wondering if I'm not formatting the config correctly.</p>
  
  <p>Is there something simple I'm doing incorrectly? Also how can I view what the limit is? It's hard to debug and see if the options I'm setting are actually doing anything.</p>
  
  <p>Thanks</p>