How to use args instead of Doc type in a mutation?
Currently I'm doing this with a type params so I can type the employee arg.
How can I do this with the new argument validation https://docs.convex.dev/functions/args-validation ?
Argument Validation | Convex Developer Hub
Argument validators ensure that queries,
2 Replies
I think you could try something like
in your schema and then
in the argument validator?
Both the schema + your arg validator would be sharing the same definition, so all the types should stay in sync?
oh ok, i see. I'll try it, thanks. would be good to add it to the docs