graphql-go / graphql

An implementation of GraphQL for Go / Golang
MIT License
9.91k stars 839 forks source link

Compare all args when testing for overlap #463

Closed bencallaway closed 4 years ago

bencallaway commented 5 years ago

Testing for overlapping arguments was only correctly testing fields with a single argument, and invariably failing for fields with multiple arguments. I've added an additional test for comparing two fields w/ two identical arguments, and a tiny fix to the sameArguments() function within rules_overlapping_fields_can_be_merged.go.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.001%) to 92.344% when pulling ca9283494fc4be7c51bdbd2a44e3c042d6f713bc on bencallaway:compare-all-args-for-overlap into bed865f0458679ed5309c2cc4bfa82a2f84d8b5f on graphql-go:master.

chris-ramon commented 4 years ago

@bencallaway thanks a lot! 👍

Closing this one since we merge this improvement via: https://github.com/graphql-go/graphql/pull/521