Alllso if you can infer a schema from a
Alllso if you can infer a schema from a couple instantiated objects, can you also do it from a typescript typedef? Would love if there's a page in convex dev Portal where I can copy paste my typedef and get a working schema
6 Replies
We've prototyped this too! It's hard to do for all TypeScript types but we could loudly fail when it doesn't work.
I think simple is super fine, it's just this has been one of the most annoying bits that kept me from embracing zod likes earlier
If we go further this direction we could let you specify argument validators with TypeScript types, but there are a lot of details to get right to make it not too confusing
like all I want is something like an online json prettifier interface where I can enter this
and get this
btw this is actually what I already got from your tech (except the union literal thing) by loading up the db and using the schema generator
@cyremur what stack did u port ur game from
I used a redux / liveblocks state sync for multiplayer before