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

POST body missing, invalid Content-Type, or JSON object has no keys. #9013

Open
mstfash opened this issue Feb 8, 2024 · 2 comments
Open

Comments

@mstfash
Copy link

mstfash commented Feb 8, 2024

Using Keystone nextjs pages router monorepo with apollo server instead of graphql-yoga, this happens when I try to upload an image from the image field of keystone.

POST body missing, invalid Content-Type, or JSON object has no keys.

if I use graphql-yoga instead I get a duplex issue which looks like this:

RequestInit: duplex option is required when sending a body

and this happens when I have bodyParser as false but if I remove bodyParser I get no steam or arrayBuffer in the File response so I cannot upload the image properly.

So any thoughts regarding that would be much appreciated! Thanks in advance

Should be uploaded without errors

Screenshot 2024-02-08 at 3 43 39 PM

"@apollo/server": "^4.9.5",
"@as-integrations/next": "^3.0.0",
"graphql-yoga": "^5.1.1",

Node version: 18
Nextjs: 14.1.0

@gautamsi
Copy link
Member

TypeError: RequestInit: duplex option is required when sending a body.

this error is due to apollo update, try to pin "@apollo/client": "3.8.10" or use latest release with #9003

@JohnbelMDev
Copy link

Could it be a middleware issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants