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

Correctly apply arg names validation rule #637

Conversation

dackroyd
Copy link
Contributor

@dackroyd dackroyd commented Apr 3, 2024

Updating implementation of KnownArgumentNamesRule to follow the graphql-js test cases. Changes required here are to correct messaging and suggestions, along with pulling in the actual test cases.

The minimum threshold is updated for the suggestion levenshteinDistance to allow suggestions for short names. From the test cases, this allows 'if' to be suggested when 'iff' is used with the @skip directive.

@dackroyd
Copy link
Contributor Author

dackroyd commented Apr 3, 2024

This is built on top of #636 and needs that to be reviewed(/merged?) first. That should bring the change here down to a single commit, which is fairly small

Edit: other PR is now merged, and I've rebased this one, so ready for review.

Updating implementation of KnownArgumentNamesRule to follow the
graphql-js test cases. Changes required here are to correct messaging
and suggestions, along with pulling in the actual test cases.

The minimum threshold is updated for the suggestion levenshteinDistance
to allow suggestions for short names. From the test cases, this allows
'if' to be suggested when 'iff' is used with the @Skip directive.
@dackroyd dackroyd force-pushed the correctly-apply-arg-names-validation-rule branch from ad08828 to 08873d6 Compare April 3, 2024 13:48
@dackroyd dackroyd marked this pull request as ready for review April 3, 2024 13:49
@pavelnikolov pavelnikolov added this pull request to the merge queue Apr 3, 2024
Merged via the queue into graph-gophers:master with commit cd26a0e Apr 3, 2024
2 checks passed
@dackroyd dackroyd deleted the correctly-apply-arg-names-validation-rule branch April 3, 2024 20:12
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.

2 participants