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

Error on unreplaced Upload scalar #176

Closed
wants to merge 1 commit into from

Conversation

mike-marcacci
Copy link
Collaborator

This fixes #175.

@mike-marcacci
Copy link
Collaborator Author

It looks like more coverage is being requested, since the scalar file was previously untested (and now it's partially tested).

I won't have a chance to add the other tests today, but figured I'd get this PR in nonetheless.

@jaydenseric
Copy link
Owner

jaydenseric commented Dec 24, 2019

Great work for looking into this so quickly! I'm not sure when I'll be able to give it a detailed review, but just a quick thought: Should we use a TypeError? GraphQL.js is using it now, see graphql/graphql-js#1827.

@mike-marcacci
Copy link
Collaborator Author

I don't know how you can stay so up to date on all these things! I would have avoided using a TypeError on my own (since I most typically associate it with the wrong JS type being passed to a function) but I see that the ecosystem is using it here so I agree we should follow suit.

@jaydenseric
Copy link
Owner

Wouldn't this approach incorrectly error when the scalar is used correctly?

@jaydenseric
Copy link
Owner

jaydenseric commented Jan 16, 2020

I'm working on an alternative, really nice but more complicated solution: #181.

@jaydenseric jaydenseric deleted the enforce-variable-replacement branch January 18, 2020 01:58
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