T
tRPC

Frozen input param

Frozen input param

MMugetsu2/2/2023
Is it possible to define a parameter on input schema (zod) that will have a hardcoded/frozen value wich should not be changed? So the value is like predefined in the schema but should be like not accessible via the client to modify? Or shall I add it in the procedure or something I guess something like this should work right?
fields: z
.enum(['addressDetails,format,lifecycle'])
.default('addressDetails,format,lifecycle'),
fields: z
.enum(['addressDetails,format,lifecycle'])
.default('addressDetails,format,lifecycle'),
Nnlucas2/2/2023
literal
MMugetsu2/2/2023
Ohh RIGHT! I've missed them somehow... Thanks ❤️

Looking for more? Join the community!

T
tRPC

Frozen input param

Join Server