graph-gophers / graphql-go

GraphQL server with a focus on ease of use
BSD 2-Clause "Simplified" License
4.64k stars 491 forks source link

Correctly apply arg names validation rule #637

Closed dackroyd closed 5 months ago

dackroyd commented 5 months ago

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 commented 5 months ago

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.