Convex 1.13.0 missing optional in types
I seem to be encountering typescript errors when upgrading to
convex
1.13.0
.
Take await ctx.db.insert('messages', message);
for example.
Here is the expected type that ctx.db.insert()
expects for message
:
await ctx.db.insert('messages', { author: 'Sam', body: 'test' });
is no longer valid because I need to explicitly define id
, name
, postId
even though they can be undefined
.
Is there a way to restore the previous optional behaviour?3 Replies
You included convex-helpers, what does your schema look like? Is it using convex-helpers helper?
I'm using the
zodToConvex
helper like this:
Thanks for the report! Working on a fix