[ra-data-graphql-simple] UNION types crash the query because the selectionSet doesnt include the union types
What you were expecting: In the ra-data-graphql-simple package, it is creating an incomplete selectionSet when it finds a union type.
Steps to reproduce: Try hooking up to a graph with union types
Related code: I have managed to get past the error with the following filter in buildFields.
if (type.kind === TypeKind.UNION) {
return acc;
}
I don't think it is useful trying to query union types when the guesser components wouldn't know how to render them. I would rather them be filtered out than cause a crash.
Thank you for opening this issue. In order to confirm it, we'll have to reproduce it. As explained in the bug report template, please fork the following CodeSandbox and repeat your issue on it:
https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/simple
This is the simplest way to confirm a bug is related to the React Admin codebase.
Without new information since 2 month, this issue is closed. Feel free to propose your fix or your reproducing examples if you're still experiencing an issue on it.