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
like-gold•4w 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
stormy-goldOP•4w ago
noted thank you 🙇♂️
like-gold•4w 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...