Closed mpoeter closed 4 years ago
Hi @mpoeter this could definitely be a good test case to add to the 1.5 release to avoid regressions. With 1.5 in RC, we aren't planning on tackling bugs like this any future 1.4 releases.
Make sense, especially since there is an easy workaround (always request the superset of required fields on the inner type). Feel free to close this anytime you like.
PRs welcome for tests!
Environment
We have a union type where some objects have a field with the same name of the same type - and that type is again an (inner) object. For different (union type) objects, we request different fields of this inner object. When returning a list of such union types, the fields for these inner objects should be returned as requested. But what actually happens is that the list of fields for the inner type depends on the first object of the list. It is rather complicated to describe the scenario, so I have created a minimal example with a unit test to reproduce this issue:
These are the test results:
It does however work if the fields have different names (e.g.
inner
andinner2
), or different types.FWIW: the error seems to be fixed in 1.5.0-rc3, but I have not found similar issue, so it might be worth adding a test to avoid regressions.