You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How can I increase max body size?(413 Payload Too Large) #771
Are you using photon in your setup? With the current information, it is not very clear that you are using photon in your setup.
This looks like more of a GraphQL Yoga issue to me. Try using the body-parser middleware itself instead of the bodyParserOptions. Maybe use apollo-server-express if graphql-yoga is not working for you.
I found that "apollo-server-express" also doesn't resolve this.
I used "graphql-apollo-server" example to setup, and replaced "apollo-server" module with "apollo-server-express" module. Also added "express" module and modified code a little bit to set the limitation up to '50mb'.
import { ApolloServer } from 'apollo-server-express'
import express from 'express'
import { schema } from './schema'
import { createContext } from './context'
import bodyParser from 'body-parser'
const app = express()
app.use('/graphql', bodyParser.json({ limit: '50mb' }))
const server = new ApolloServer({
schema,
context: createContext,
})
server.applyMiddleware({ app, path: '/graphql' })
app.listen(4000, () =>
console.log(
`🚀 Server ready at: http://localhost:4000\n⭐️ See sample queries: http://pris.ly/e/ts/graphql-apollo-server#5-using-the-graphql-api`,
),
)
Error message is just exactly same with the one from "graphql-yoga" trial.
So should I go there and ask help to resolve this?
But difference is that in my case, I didn't get the error when payload size was less than around 200kb. On the other hand, photon is said to have 32kb limitation(according to prisma/prisma-client-js#246).
If there is already a photonjs issue for this, we will address this.
I will close this as a duplicate of prisma/prisma-client-js#246 for now. Can you please provide me with the exact queries and maybe a git repository of the code for reproduction(post it in the other issue)? That would help us a ton as the other bug is not confirmed.
Activity
pantharshit00 commentedon Oct 17, 2019
Hi,
Are you using photon in your setup? With the current information, it is not very clear that you are using photon in your setup.
This looks like more of a GraphQL Yoga issue to me. Try using the body-parser middleware itself instead of the
bodyParserOptions. Maybe use apollo-server-express if graphql-yoga is not working for you.xero0001 commentedon Oct 17, 2019
Oh hi. I'm using photonjs to set up my project based on "prisma2 init" with typescript, Auth example, and mysql.
I'm planning to start my project with body-parser middleware and apollo-server-express. Then I'll share my results (with some feedback) soon.
Thank you so much for your support!
xero0001 commentedon Oct 21, 2019
Firstly, it doesn't work on graphql-yoga with body-parser middleware.
(With "prisma2 preview014.2 initialization", Typescript, Auth Example, MySQL)
Following code is from my server.ts
Following error is from backend console.
I will try "apollo-server-express" and comment again.
xero0001 commentedon Oct 21, 2019
I found that "apollo-server-express" also doesn't resolve this.
I used "graphql-apollo-server" example to setup, and replaced "apollo-server" module with "apollo-server-express" module. Also added "express" module and modified code a little bit to set the limitation up to '50mb'.
Error message is just exactly same with the one from "graphql-yoga" trial.
captured from Safari.
Querying over 200kb doesn't generates error at all.
But updating large data produces "Payload too large" error.
And I found that this error is referred to be not caused by GraphQL Yoga or Apollo Server, but by Photonjs.
prisma/prisma-client-js#246
So should I go there and ask help to resolve this?
But difference is that in my case, I didn't get the error when payload size was less than around 200kb. On the other hand, photon is said to have 32kb limitation(according to prisma/prisma-client-js#246).
pantharshit00 commentedon Oct 22, 2019
If there is already a photonjs issue for this, we will address this.
I will close this as a duplicate of prisma/prisma-client-js#246 for now. Can you please provide me with the exact queries and maybe a git repository of the code for reproduction(post it in the other issue)? That would help us a ton as the other bug is not confirmed.
xero0001 commentedon Oct 22, 2019
I shared my repository at the other issue.
prisma/prisma-client-js#246
Thank you!
TML-2890: one descriptor per storage entity kind (replaces three para…
docs(postgres-rls): bring main's RLS plan/spec up to the re-cut + mar…
TML-2503: reconcile extension-supabase spec/plan to as-built (slice A) (
TML-2868: SELECT RLS policies, dependable end-to-end — authored in PS…
chore(postgres-rls): close out the project — promote ADRs, delete pro…