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

Ensure GraphQLUpload scalar errors when parsing invalid values #181

Merged
merged 4 commits into from Jan 19, 2020

Conversation

jaydenseric
Copy link
Owner

@jaydenseric jaydenseric commented Jan 17, 2020

This PR ensures the GraphQLUpload scalar errors when parsing invalid values.

The processRequest function now places references to instances of the now exported and documented Upload class in the GraphQL operation for the GraphQLUpload scalar to derive its value, and the GraphQLUpload scalar now throws a GraphQLError when it parses an invalid value.

Fixes #175.

@jaydenseric jaydenseric marked this pull request as ready for review January 17, 2020 08:14
Copy link
Collaborator

@mike-marcacci mike-marcacci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fantastic. I especially like that you documented where the various fields of Upload are intended to be used.

@jaydenseric jaydenseric merged commit 15bd494 into master Jan 19, 2020
@jaydenseric jaydenseric deleted the fix-issue-175 branch January 19, 2020 04:15
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

Successfully merging this pull request may close these issues.

Should throw error when a JSON instead of a File is received from client
2 participants