-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Error when processing uploads after upgrading to v10 #185
Comments
Most likely the client is not sending a GraphQL multipart request. Check your network activity for the GraphQL request being sent from the client to see if it a multipart request or not. I'm not sure the best way to configure your particular GraphQL client so that it detects files are used in variables, in order to conditionally send a normal GraphQL POST request or the special multipart request. |
I get this same issue from upgrading from 9.0.0 to 10.0.0, works great in 9.0.0 but now with the upgrade to 10.0.0 it fails giving the same error. I am using Apollo Server |
I face the same issue. As soon as I upgrade to version 10.0.0 I get the same error message as shown above. After downgrading to version 9.0.0, it works again. I'm also using Apollo Server and Apollo Client with |
@RyannGalea @jz222 what version of node are you running? |
|
|
I also get the issue with v10, but not v9. (I'm using a setup with NestJS) When testing the curl file list request manually in the terminal I get the response If i manually add |
I face the same issue, with NestJS 6.9 and graphql-upload 10.0.0 |
Hi! I'm facing the same issue, I'm using: apollo-server-express@2.9.16 I'm sending a file using:
In the server I'm using
Every time I try to upload an image I'm getting:
Looking in your code I can see, in the file GraphQLUpload.js:
If I print the value received in parseValue function I can see in my console:
So replacing the above mentioned code, the Upload Scalar, by:
Everything is working as expected, however I don't know how to validate the received value, or if I even need to do so ... Will it be fixed? Can I help any way? Thanks in advance! Szz |
Sorry for the delay here - both @jaydenseric and myself are totally slammed at the moment with our "day jobs." However, I have a suspicion: where are you all getting your |
@mike-marcacci If you are referring to GraphQLUpload I'm just importing it from your package
Must I change it? Thanks again! P.D: don't worry about delays, everyone is busy ... |
@szz-dvl I totally missed your comment up above. So in this case my suspicion is that you do indeed have two versions installed, but in the opposite order I had assumed:
I suspect that Apollo is running v9 here and needs to update. If you're using yarn for package management you can run |
Hey! Did as you suggested, working properly now! Really appreciated! Szz. |
For anyone having problems after upgrading to v10, try running Apollo Server uses an old If you are experiencing issues relating to Apollo Server, please raise issues on the Apollo side instead of here, it's on them to keep their dependencies up to date and provide support. |
Is there any current solution for this yet? In regards to apollo-server-express. This is a bit of a pain |
Yes @RyannGalea you can add this into your package.json to force
Running This should fix the issue, the upgrade was seamless after that for me 👍 |
for everyone who might face it using Apollo with NestJS it seems that new versions of In the fork description they indeed advised not to depend on their fork straightforward, but disable it by passing Since I have possibility to use hybrid REST and Apollo server, I would go for this option for now |
Facing the very same issue :-/ |
@chris-aeviator if you have no option to use hybrid app, then the only other solution I found is to use additional middleware before Apollo one like @jaydenseric mentioned so it will catch all files and work with them as you need and won't pass them to regular Apollo. I guess it was a cause why my app stopped understand multi-part at all: I turned of the build-in one, but didn't add any other |
I'm using graphql yoga so I'm unsure howto set this middleware EDIT: wait - you say apollo - am I supposed to do this on the client (the uploading frontend) EDIT2 : |
I'm testing graphql-upload with graphql-relay / mutationWithClientMutationId. However, the return value is {}
Any solution?
The text was updated successfully, but these errors were encountered: