const MySchema = Schema.Struct({
optionalValue: Schema.Option(Schema.String)
});
...
myProcedure: protectedProcedure
.input(S.decodeUnknownSync(MySchema)) // validating and decoding
.mutation(async ({ ctx, input }) => {
// ...
})
const MySchema = Schema.Struct({
optionalValue: Schema.Option(Schema.String)
});
...
myProcedure: protectedProcedure
.input(S.decodeUnknownSync(MySchema)) // validating and decoding
.mutation(async ({ ctx, input }) => {
// ...
})