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
Hi there.
I cannot upload a file as I get "Upload value invalid" error, unless I override parseValue function. As I see, there is a condition in parseValue function (in the GraphQLUpload.js file) that expects to get an instance of Uploadvalue.
I think this condition should be changed to something like this value instanceof Blob to resolve the error (Check the value to be an instance of Blob instead of Upload).
p.s.: It seems this condition added to resolve this issue.
The text was updated successfully, but these errors were encountered:
Why would you expect it to not be an Upload instance? Perhaps you are importing the GraphQLUpload scalar from a different graphql-upload version than the processRequest function is from. You can check by running npm ls graphql-upload - there should only be one version in your node_modules.
I use apollo-server-express that uses graphql-upload v8.1.0 as a dependency and I installed the latest version (v10.0.0) to define Upload scalar (apollo-server handles uploading files (with graphql-upload) but I should create Upload scalar manually because I use nexus to create GraphQL schemas). So there are two versions of graphql-upload package inevitably.
Closing because the problem is not an issue with graphql-upload. There are existing issues you can find in the Apollo repos about graphql-upload being outdated in their dependencies, and the various workarounds available to manually upgrade.
Hi there.
I cannot upload a file as I get "Upload value invalid" error, unless I override
parseValue
function. As I see, there is a condition inparseValue
function (in theGraphQLUpload.js
file) that expects to get an instance ofUpload
value
.I think this condition should be changed to something like this
value instanceof Blob
to resolve the error (Check thevalue
to be an instance of Blob instead ofUpload
).p.s.: It seems this condition added to resolve this issue.
The text was updated successfully, but these errors were encountered: