Is collection schema just for type inference, or is it leveraged internally for other operations?
Do I gain anything by adding a schema to a collection when my api already returns typed responses?
3 Replies
conscious-sapphire•3mo ago
We don't yet support grabbing the return type -- we need to add that
So the schema does provide the type plus it does runtime validation of optimistic mutations
exotic-emeraldOP•3mo ago
noted thank you 🙇♂️
conscious-sapphire•3mo ago
GitHub
Add type inference from queryFn return type in query-db-collection ...
Description Currently, query-db-collection requires explicit type parameters or schema for type inference. This issue proposes adding support for inferring types from the queryFn return type, simil...