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

Limits errors in getVariableValues() #2062

Merged
merged 1 commit into from Aug 7, 2019

Conversation

IvanGoncharov
Copy link
Member

Based on #2037

@IvanGoncharov IvanGoncharov added the PR: feature 🚀 requires increase of "minor" version number label Jul 29, 2019
/**
* Coerces a JavaScript value given a GraphQL Input Type.
*/
export function coerceInputValue(
Copy link
Member Author

Choose a reason for hiding this comment

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

I decided to create a new coerceInputValue function sine coerceValue is part of public API so we can't change its behavior.

In addition to that the new name is less confusing since GraphQL Spec defines Input coercion and Result coercion:
https://graphql.github.io/graphql-spec/draft/#sec-Scalars.Input-Coercion

@IvanGoncharov
Copy link
Member Author

It's draft PR (I still need to work on tests) but it would be great to get feedback on a new coerceInputValue API function and a general approach to limiting the number of errors.

@SoyYoRafa @Cito Can you please take a look?

@SoyYoRafa
Copy link

I took a look after the fact, looks good. I thought about doing a similar thing but since I am not a maintainer, I didn't want to just rewrite parts of the code.

@IvanGoncharov
Copy link
Member Author

@SoyYoRafa Thanks for the review 👍
Since this change introduces new API I need to release it as 14.5.0 next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: feature 🚀 requires increase of "minor" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants