You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As can be seen here, the first step in the loop on args1 is to discover the matching argument in args2 by name. If it can't be found, return false, otherwise true if matching or false if not – but javascript has the extra nice every option to ensure that each iteration is true.
The current golang implementation ignores the every, and as such will throw invalid if there is more than one argument in the slice.
The current implementation of
sameArguments
is invalid due to early exit in the loops.https://github.com/graphql/graphql-js/blob/main/src/validation/rules/OverlappingFieldsCanBeMergedRule.ts#L626-L642
As can be seen here, the first step in the loop on args1 is to discover the matching argument in args2 by name. If it can't be found, return false, otherwise true if matching or false if not – but javascript has the extra nice
every
option to ensure that each iteration is true.The current golang implementation ignores the
every
, and as such will throw invalid if there is more than one argument in the slice.#170 also adds test cases to cover this capability.
The text was updated successfully, but these errors were encountered: