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
Should throw error when a JSON instead of a File is received from client #175
Labels
Comments
HosseinAgha
changed the title
Should throw error when a JSON instead of a File sent in variables
Should throw error when a JSON instead of a File is received from client
Dec 23, 2019
Thanks for the report @HosseinAgha. I can confirm what you're describing: when a variable of type |
jaydenseric
added a commit
that referenced
this issue
Jan 17, 2020
jaydenseric
added a commit
that referenced
this issue
Jan 19, 2020
Ensure `GraphQLUpload` scalar errors when parsing invalid values, fixing #175 .
krasivyy3954
added a commit
to krasivyy3954/react-graphql-upload
that referenced
this issue
Jan 6, 2023
krasivyy3954
added a commit
to krasivyy3954/react-graphql-upload
that referenced
this issue
Jan 6, 2023
Ensure `GraphQLUpload` scalar errors when parsing invalid values, fixing jaydenseric/graphql-upload#175 .
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I send a JSON (number, string, object, etc) instead of a File from client, I don't get any errors and the argument returns a JS Object instead of Promise<FileUpload>.
Is this working correctly? Shouldn't this throw an error in the
parseValue
of scalar? We are expecting a stream after all.This forces us to validate the input every time we are using
Upload
scalar.I'm using Apollo Server (and
apollo-upload-client
which does not matter in this scenario)The text was updated successfully, but these errors were encountered: