Description
Two aliases of the same relation without arguments are merged into one query node. When their nested selections differ, only one of them gets its fields or collections loaded, and the other alias resolves to DTOMissing.
Reproduction
Against the integration test schema (SQLite or PostgreSQL):
{
colorsSweet {
id
a: fruits { id farms(limit: 1) { id name } }
b: fruits { id farms(limit: 2) { id } }
}
}
String cannot represent value: <class DTOMissing>
a and b both select fruits with no arguments, so they collapse into one node. Their farms children differ (limit: 1 with name, limit: 2 without), and only one of the two farms selections loads name.
Other symptoms of the same cause
Fuzzing alias-heavy queries turned up the same family of errors:
String cannot represent value: <class DTOMissing>
Expected value of type 'ProductType' but got: <class DTOMissing>
Expected Iterable, but did not find one for field 'FruitType.farms'
All of them reproduce identically on main (60857f2), so this is not a recent regression.
Expected
Each alias returns its own nested selection, as if the two aliases had been queried separately.
Description
Two aliases of the same relation without arguments are merged into one query node. When their nested selections differ, only one of them gets its fields or collections loaded, and the other alias resolves to
DTOMissing.Reproduction
Against the integration test schema (SQLite or PostgreSQL):
{ colorsSweet { id a: fruits { id farms(limit: 1) { id name } } b: fruits { id farms(limit: 2) { id } } } }aandbboth selectfruitswith no arguments, so they collapse into one node. Theirfarmschildren differ (limit: 1withname,limit: 2without), and only one of the twofarmsselections loadsname.Other symptoms of the same cause
Fuzzing alias-heavy queries turned up the same family of errors:
String cannot represent value: <class DTOMissing>Expected value of type 'ProductType' but got: <class DTOMissing>Expected Iterable, but did not find one for field 'FruitType.farms'All of them reproduce identically on
main(60857f2), so this is not a recent regression.Expected
Each alias returns its own nested selection, as if the two aliases had been queried separately.