What new in Convex November 2025 - Zod4 - Validators - Codegen - React Query
FULL TRANSCRIPT
Despite being less than a dozen people
or so, the engineering team at Convex
has been absolutely ripping through new
features lately, up to the point where
it's actually really quite hard to keep
up with it all. So today, I thought I
would share a few of my favorite updates
in rapid fire fashion so you can get
back to pushing your AI model around.
All right, so first up, there's been a
bunch of work lately to add a few more
helper functions to the convex
validators. So before this latest
update, which is v 1.29, 29. You had to
manually redefine validators whenever
you needed slight variations like you
can see here. Or a way that I often do
it is I extract out common fields into
an object that you then spread into
other validators. Um I've done this many
times on various projects. But now I
don't need to because we can reuse and
transform these validators with these
handydandy pick and omit functions. And
then there's also this new
partial.parial partial function that
allows us to make a specific validator
entirely optional. And you can use this
extend to extend an existing validator
without doing that spread trick. Very
cool, super useful.
But that's not all for validators. So,
previously you would have to manually
write out the pageionation result
validator. Something like this. Kind of
ugly and annoying if you ask me. Well,
now you don't need to because you can
use this built-in pageionating result
validator helper. Much nicer. Well, by
the way, if you like this kind of
update, Convex updates video, convex
news video, then don't forget to like
and sub as it really helps me know what
folks like and don't like and also it
means you'll get more of this kind of
video in your feed.
Oh, one last thing from validators, we
have this new nullable helper. So if you
are like me and you have written this
kind of thing frequently where your code
you do a union to produce a nullable
string well you don't need to do it
anymore because you can now use this
nullable on a string and it's now a
nullable string.
So this is an interesting one. So
previously u generated files in the
/convex generated folder would be added
with a td.ts ts and ajs file. But now
you can configure it so that you can
either get it to generate uh as as it
was before or you can get it generate
with a ts extension without those.js and
DTS files. This is really nice for IDE
tooling um and it keeps things nice and
consistent with components uh which
always used thet extension anyway.
So, this is one I wanted to cover, not
just because I personally worked on it,
but because I think it's actually really
cool. Um, if you're using our React
query library, you might have noticed a
little annoyance where you had to pass
in an empty object even if the function
didn't actually require any arcs. And I
knew there must be a way that this to
remove this requirement because uh our
just regular React use query hook
doesn't require it. Well, as of the next
version of React Query, Convex React
Query, you no longer have to provide it
just like with use query. And the same
goes for situations where you supply an
arc that doesn't actually need to be
there. So, um, for example, in this case
here, we're providing something, but the
function list doesn't take a something.
So, what this would do is would create a
runtime error in your validator because
the function would run and it would say,
"Ah, you've provided something that
doesn't need to be there." But
Typescript should catch us here.
Previously, our React query
implementation didn't uh error here, but
it now does. Much nicer.
All right, so this one definitely
deserves special mention because it was
a long time coming and honestly more
work than we expected. For those of you
that weren't aware, Zod released version
4 um a fair time ago, but only recently
became stable. and it came with a bunch
of pretty significant changes, but some
awesome new features. The ComX team knew
that we needed to update the the helper
support, but we thought it would be
relatively straightforward, but it ended
up turning into multiple PRs and this
massive 180 commit monster that took
weeks to get right. One of the main
challenges that we wanted to support
both Zod 3 and Zod 4 at the same time
and give everybody a smooth migration
path. And so this basically meant
implementing everything twice, not to
mention all the extra support that we
needed around Zod's four schemas, etc.
So what did we end up with? Well, first
up, the helpers can now work with both
Zod 3 and Zod 4 out of the box. If
you're using Zod 3, you can import from
convex helpers/server/zod
3. And if you're using ZOD 4, you can
import from convexhelpers/server/zod
4. But the really cool new thing is zod
4 codecs. One really nice thing we can
do with codecs is it allows us to
convert from one type to another. So for
example, here we have a codec that
allows us to convert from an ISO date
string and a to a JavaScript date object
and back again. Then in our convex code,
we can use it like so. Notice here how
the uh date argument is automatically
decoded into a JavaScript date object
which we can then work with as we
normally would. And then when we return
it, the codec automatically encodes it
back into a string. Then on the front
end, we can use that codec again to
encode it back to a date. Super clean. I
do want to just give a quick massive
shout out to Karen Single and Nate Dunn
who were instrumental with helping with
this uh upgrade from Zod 3 to Zod 4. So,
thanks guys. All right. Well, there you
have it. Just a quick rapid fire tour
through some of the latest convex that I
think are the most important ones, but
there's so much more that I didn't
cover. Like I said, the team is
absolutely ripping through new features
at the moment and it's just genuinely
hard to keep up. So, if there's anything
I covered here today that you'd like me
to dive into a bit deeper, then don't
forget to drop me a comment down below.
I love reading them and I try and
respond to most of them. Anyway, that's
it for me for today. Until next time,
thanks for watching. Cheerio.
UNLOCK MORE
Sign up free to access premium features
INTERACTIVE VIEWER
Watch the video with synced subtitles, adjustable overlay, and full playback control.
AI SUMMARY
Get an instant AI-generated summary of the video content, key points, and takeaways.
TRANSLATE
Translate the transcript to 100+ languages with one click. Download in any format.
MIND MAP
Visualize the transcript as an interactive mind map. Understand structure at a glance.
CHAT WITH TRANSCRIPT
Ask questions about the video content. Get answers powered by AI directly from the transcript.
GET MORE FROM YOUR TRANSCRIPTS
Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.