Skip to content

Conversation

@bbakerman
Copy link
Member

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

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)]
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This fails!

Copy link
Member Author

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)]
Copy link
Member Author

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 ??

Copy link
Member Author

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

@bbakerman bbakerman added this to the 2023 October milestone Sep 21, 2023
@bbakerman bbakerman added the needs to be backported a bugfix that still needs to be backported label Sep 21, 2023
fieldType = fieldDefinition != null ? fieldDefinition.getType() : null;
}
fieldMap.get(responseName).add(new FieldAndType(field, fieldType, parentType));
fieldMap.get(responseName).add(new FieldAndType(field, fieldType, unwrappedParent));
Copy link
Member Author

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

@dondonz dondonz added this pull request to the merge queue Oct 17, 2023
Merged via the queue into master with commit 517fc70 Oct 17, 2023
dondonz added a commit that referenced this pull request Oct 22, 2023
dondonz added a commit that referenced this pull request Oct 22, 2023
@dondonz dondonz deleted the issue-3332-overlapping-fields-aliaes-should-be-prevented branch October 22, 2023 01:58
bbakerman pushed a commit that referenced this pull request Oct 23, 2023
bbakerman pushed a commit that referenced this pull request Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs to be backported a bugfix that still needs to be backported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants