-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Issue 3332 - overlapping aliases should be prevented #3334
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
Issue 3332 - overlapping aliases should be prevented #3334
Conversation
| errorCollector.getErrors().size() == 1 | ||
| errorCollector.getErrors()[0].message == "Validation error (FieldsConflict@[cat]) : 'name' : 'foo1' and 'foo2' are different fields" | ||
| errorCollector.getErrors()[0].locations == [new SourceLocation(3, 13), new SourceLocation(4, 13)] | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and is now fixed
| then: | ||
| errorCollector.getErrors().size() == 1 | ||
| errorCollector.getErrors()[0].message == "Validation error (FieldsConflict@[dog]) : 'name' : 'nickname' and 'name' are different fields" | ||
| errorCollector.getErrors()[0].locations == [new SourceLocation(3, 13), new SourceLocation(4, 13)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does NOT fail ; wat ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dog parent field was nullable
| fieldType = fieldDefinition != null ? fieldDefinition.getType() : null; | ||
| } | ||
| fieldMap.get(responseName).add(new FieldAndType(field, fieldType, parentType)); | ||
| fieldMap.get(responseName).add(new FieldAndType(field, fieldType, unwrappedParent)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the bug. When the parent type is a non null (or list) wrapped type - it was not being held in the field+ parent type construct as that BUT it was being compared as if it was a fully unwrapped type
This shows the problem as reported in #3332 as happening
However I have another test that works and logically I cant see the difference.
Anyway here is a reproduction we can work on