You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described in #108, when making a query on a union, the result type will include all fields of the union regardless if they were selected or not. This causes issues with recursive types in e.g. Remix loader functions.
Thanks for the quick feedback! The reason for the json call is that the loader runs on the server and is sent serialized to the client. So some types, such as Dates will then be typed as Date in the Index function running on the client, while they have actually been converted to a string by Remix (I think that's what the Serialize* types are supposed to handle). But yeah, in this case it seems to work.
As described in #108, when making a query on a union, the result type will include all fields of the union regardless if they were selected or not. This causes issues with recursive types in e.g. Remix loader functions.
See CodeSandbox at https://codesandbox.io/p/sandbox/xenodochial-hill-qckj7d for an example - the error is in app/routes/_index.tsx at line 22.
The text was updated successfully, but these errors were encountered: