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

Invalid body: request entity too large - how to configure it? #1225

Open
gustawdaniel opened this issue Jul 13, 2020 · 1 comment
Open

Invalid body: request entity too large - how to configure it? #1225

gustawdaniel opened this issue Jul 13, 2020 · 1 comment
Labels
scope/server Related to the server component type/feat Add a new capability or enhance an existing one

Comments

@gustawdaniel
Copy link

gustawdaniel commented Jul 13, 2020

There can be added method to configure size of body.

Problem exists probably after about 100kB.

@gustawdaniel gustawdaniel added plugin/prisma type/feat Add a new capability or enhance an existing one labels Jul 13, 2020
@gustawdaniel
Copy link
Author

gustawdaniel commented Jul 13, 2020

I fixed by lines:

import { server } from 'nexus'

const app = server.express
const bodyParser = require('body-parser')
app.use(bodyParser.json({type: 'application/json', limit: '1mb'}))

It seems to be connected with:

graphql-nexus/nexus#970

I can't understand why configuration of express have influence on graphql server, but my fix works.

@Weakky Weakky added scope/server Related to the server component and removed plugin/prisma labels Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope/server Related to the server component type/feat Add a new capability or enhance an existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants