-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Compiler: fix validation of required fields with default values #2903
Compiler: fix validation of required fields with default values #2903
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tyao1 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one change
packages/relay-compiler/transforms/ValidateRequiredArgumentsTransform.js
Outdated
Show resolved
Hide resolved
Previously, Relay Compiler threw an error incorrectly on fields with required values AND default values defined in the schema. This change takes the default values into account so that you don't have to specify them in the operation/fragment definition. Closes: #2894
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
Hi @tyao1 - would you please consider importing it again? I fixed the code review comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tyao1 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@mrtnzlml thank you for fixing this! I'll try to release 7.0.1 soon |
Summary: Previously, Relay Compiler threw an error incorrectly on fields with required values AND default values defined in the schema. This change takes the default values into account so that you don't have to specify them in the operation/fragment definition. Closes: #2894 Pull Request resolved: #2903 Reviewed By: josephsavona Differential Revision: D18109039 Pulled By: tyao1 fbshipit-source-id: c801d2eb2c3e13cc6d879ce44b6dd158f2b25aa3
Previously, Relay Compiler threw an error incorrectly on fields with required values AND default values defined in the schema. This change takes the default values into account so that you don't have to specify them in the operation/fragment definition.
Closes: #2894