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

Fix arguments comparison logic for overlapping fields #164

Closed
wants to merge 1 commit into from

Conversation

0xhmn
Copy link

@0xhmn 0xhmn commented Oct 13, 2021

The current argument comparison seems different from graphql-js which is resulting in unexpected behavior like this.
Instead of comparing all the arguments to each other, we just need to compare the corresponding ones (with the same argument.Name)

@coveralls
Copy link

coveralls commented Oct 13, 2021

Coverage Status

Coverage increased (+0.05%) to 92.203% when pulling 2c30ea7 on yar00001:hmn/fix-conflict-logic into 2a3d320 on vektah:master.

@0xhmn
Copy link
Author

0xhmn commented Oct 13, 2021

I'll update the PR to match the implementation in graphql-js

@0xhmn 0xhmn force-pushed the hmn/fix-conflict-logic branch 2 times, most recently from 00292f8 to 2675fc6 Compare October 13, 2021 21:28
for _, arg1 := range args1 {
var match *ast.Argument
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could probably just be a bool

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was trying to follow this logic. I can change it to boolean.

"github.com/vektah/gqlparser/v2/ast"
. "github.com/vektah/gqlparser/v2/validator"
"reflect"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unintended change?

@0xhmn
Copy link
Author

0xhmn commented Oct 25, 2021

Hello - Any chance we can get a review on this PR?

@jufemaiz
Copy link
Contributor

jufemaiz commented Nov 12, 2021

I have just hit this as a blocking issue :sadpanda:

I've created an alternative that includes tests @ #170

@StevenACoffman
Copy link
Collaborator

Closing in favor of #170 but thanks for getting this started!

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.

None yet

5 participants