TRANSCRIPTEnglish

What new in Convex November 2025 - Zod4 - Validators - Codegen - React Query

6m 23s1,132 words162 segmentsEnglish

FULL TRANSCRIPT

0:00

Despite being less than a dozen people

0:02

or so, the engineering team at Convex

0:04

has been absolutely ripping through new

0:06

features lately, up to the point where

0:08

it's actually really quite hard to keep

0:09

up with it all. So today, I thought I

0:11

would share a few of my favorite updates

0:13

in rapid fire fashion so you can get

0:15

back to pushing your AI model around.

0:20

All right, so first up, there's been a

0:21

bunch of work lately to add a few more

0:23

helper functions to the convex

0:25

validators. So before this latest

0:27

update, which is v 1.29, 29. You had to

0:30

manually redefine validators whenever

0:32

you needed slight variations like you

0:34

can see here. Or a way that I often do

0:37

it is I extract out common fields into

0:39

an object that you then spread into

0:41

other validators. Um I've done this many

0:44

times on various projects. But now I

0:47

don't need to because we can reuse and

0:49

transform these validators with these

0:51

handydandy pick and omit functions. And

0:54

then there's also this new

0:56

partial.parial partial function that

0:58

allows us to make a specific validator

1:00

entirely optional. And you can use this

1:03

extend to extend an existing validator

1:05

without doing that spread trick. Very

1:07

cool, super useful.

1:11

But that's not all for validators. So,

1:13

previously you would have to manually

1:15

write out the pageionation result

1:18

validator. Something like this. Kind of

1:20

ugly and annoying if you ask me. Well,

1:23

now you don't need to because you can

1:24

use this built-in pageionating result

1:26

validator helper. Much nicer. Well, by

1:29

the way, if you like this kind of

1:31

update, Convex updates video, convex

1:33

news video, then don't forget to like

1:35

and sub as it really helps me know what

1:37

folks like and don't like and also it

1:39

means you'll get more of this kind of

1:40

video in your feed.

1:43

Oh, one last thing from validators, we

1:46

have this new nullable helper. So if you

1:49

are like me and you have written this

1:51

kind of thing frequently where your code

1:52

you do a union to produce a nullable

1:55

string well you don't need to do it

1:57

anymore because you can now use this

1:59

nullable on a string and it's now a

2:02

nullable string.

2:06

So this is an interesting one. So

2:07

previously u generated files in the

2:10

/convex generated folder would be added

2:14

with a td.ts ts and ajs file. But now

2:20

you can configure it so that you can

2:22

either get it to generate uh as as it

2:24

was before or you can get it generate

2:26

with a ts extension without those.js and

2:29

DTS files. This is really nice for IDE

2:32

tooling um and it keeps things nice and

2:35

consistent with components uh which

2:37

always used thet extension anyway.

2:42

So, this is one I wanted to cover, not

2:43

just because I personally worked on it,

2:45

but because I think it's actually really

2:46

cool. Um, if you're using our React

2:50

query library, you might have noticed a

2:52

little annoyance where you had to pass

2:54

in an empty object even if the function

2:57

didn't actually require any arcs. And I

3:00

knew there must be a way that this to

3:02

remove this requirement because uh our

3:05

just regular React use query hook

3:08

doesn't require it. Well, as of the next

3:11

version of React Query, Convex React

3:13

Query, you no longer have to provide it

3:15

just like with use query. And the same

3:18

goes for situations where you supply an

3:21

arc that doesn't actually need to be

3:23

there. So, um, for example, in this case

3:26

here, we're providing something, but the

3:29

function list doesn't take a something.

3:30

So, what this would do is would create a

3:33

runtime error in your validator because

3:35

the function would run and it would say,

3:36

"Ah, you've provided something that

3:38

doesn't need to be there." But

3:39

Typescript should catch us here.

3:41

Previously, our React query

3:43

implementation didn't uh error here, but

3:47

it now does. Much nicer.

3:52

All right, so this one definitely

3:53

deserves special mention because it was

3:55

a long time coming and honestly more

3:57

work than we expected. For those of you

3:59

that weren't aware, Zod released version

4:01

4 um a fair time ago, but only recently

4:05

became stable. and it came with a bunch

4:09

of pretty significant changes, but some

4:11

awesome new features. The ComX team knew

4:13

that we needed to update the the helper

4:15

support, but we thought it would be

4:17

relatively straightforward, but it ended

4:20

up turning into multiple PRs and this

4:22

massive 180 commit monster that took

4:26

weeks to get right. One of the main

4:28

challenges that we wanted to support

4:29

both Zod 3 and Zod 4 at the same time

4:32

and give everybody a smooth migration

4:33

path. And so this basically meant

4:35

implementing everything twice, not to

4:37

mention all the extra support that we

4:39

needed around Zod's four schemas, etc.

4:43

So what did we end up with? Well, first

4:44

up, the helpers can now work with both

4:46

Zod 3 and Zod 4 out of the box. If

4:49

you're using Zod 3, you can import from

4:50

convex helpers/server/zod

4:53

3. And if you're using ZOD 4, you can

4:55

import from convexhelpers/server/zod

4:57

4. But the really cool new thing is zod

5:00

4 codecs. One really nice thing we can

5:03

do with codecs is it allows us to

5:05

convert from one type to another. So for

5:08

example, here we have a codec that

5:10

allows us to convert from an ISO date

5:12

string and a to a JavaScript date object

5:16

and back again. Then in our convex code,

5:18

we can use it like so. Notice here how

5:21

the uh date argument is automatically

5:23

decoded into a JavaScript date object

5:26

which we can then work with as we

5:27

normally would. And then when we return

5:29

it, the codec automatically encodes it

5:32

back into a string. Then on the front

5:34

end, we can use that codec again to

5:37

encode it back to a date. Super clean. I

5:41

do want to just give a quick massive

5:42

shout out to Karen Single and Nate Dunn

5:45

who were instrumental with helping with

5:47

this uh upgrade from Zod 3 to Zod 4. So,

5:51

thanks guys. All right. Well, there you

5:53

have it. Just a quick rapid fire tour

5:55

through some of the latest convex that I

5:56

think are the most important ones, but

5:58

there's so much more that I didn't

6:00

cover. Like I said, the team is

6:02

absolutely ripping through new features

6:03

at the moment and it's just genuinely

6:04

hard to keep up. So, if there's anything

6:06

I covered here today that you'd like me

6:07

to dive into a bit deeper, then don't

6:10

forget to drop me a comment down below.

6:11

I love reading them and I try and

6:13

respond to most of them. Anyway, that's

6:15

it for me for today. Until next time,

6:17

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.

SIGN UP FREE TO UNLOCK

AI SUMMARY

Get an instant AI-generated summary of the video content, key points, and takeaways.

SIGN UP FREE TO UNLOCK

TRANSLATE

Translate the transcript to 100+ languages with one click. Download in any format.

SIGN UP FREE TO UNLOCK

MIND MAP

Visualize the transcript as an interactive mind map. Understand structure at a glance.

SIGN UP FREE TO UNLOCK

CHAT WITH TRANSCRIPT

Ask questions about the video content. Get answers powered by AI directly from the transcript.

SIGN UP FREE TO UNLOCK

GET MORE FROM YOUR TRANSCRIPTS

Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.