-
Notifications
You must be signed in to change notification settings - Fork 103
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
Fix required fields regression #203
Fix required fields regression #203
Conversation
Can confirm that I have this issue too, and that Matt's fix (applied directly to Note it only wraps the code in an |
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.
This LGTM to me with one nitty, formatting-related comment below, but a slight question as to whether or not this was intentional or not.
It looks like this was removed in 6886c0f#diff-95dbafa783634330b4c1ec80e94c9964L34.
@stubailo Do you have any recollection of a specific reason the if (!def)
conditional might have been removed in the above commit?
src/customGraphQLValidationRules.js
Outdated
[node] | ||
) | ||
); | ||
if (def) { |
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.
Rather than indent entire block to encapsulate it with this if
conditional, would it be possible to opt for the behavior that was here before which return
ed when def
wasn't truthy?:
eslint-plugin-graphql/src/customGraphQLValidationRules.js
Lines 34 to 36 in f1331d2
if (!def) { | |
return; | |
} |
(In general, reducing over-indentation seems like a good principle to maintain.)
…early. # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # HEAD detached at 6e694c9 # Changes to be committed: # modified: customGraphQLValidationRules.js #
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.
LGTM.
Thanks for opening this PR! I made a couple of formatting changes, but this has now landed in |
TODO:
Fixes a regression of #63 introduced in v3.0.0