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

File Upload node 18 fails with dom.FormData #384

Closed
arsonik opened this issue Sep 7, 2022 · 3 comments
Closed

File Upload node 18 fails with dom.FormData #384

arsonik opened this issue Sep 7, 2022 · 3 comments

Comments

@arsonik
Copy link

arsonik commented Sep 7, 2022

Running with node 18 fails.
The same exact code works with node17.

I've worked around it temporarily by setting globally FormData to undefined

global.FormData = undefined;
@BJvdA
Copy link

BJvdA commented Jan 11, 2023

Can attest to this, seems like the FormData available natively since node 18 does not work with this implementation: https://github.com/prisma-labs/graphql-request/blob/master/src/createRequestBody.ts#L49

@ldrick
Copy link

ldrick commented Jan 19, 2023

We got the same problem and for the time being it is solved like @arsonik is proposing.

@jasonkuhrt
Copy link
Member

#500

SimenB added a commit to SimenB/graphql-request that referenced this issue May 30, 2023
SimenB added a commit to SimenB/graphql-request that referenced this issue May 30, 2023
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

4 participants