Open OsamaAburabie opened 1 year ago
@OsamaAburabie no the omit fields are not propagated to where schemas. Would this be really necessary for you since the fields in where inputs should be optional by default anyway?
@chrishoermann I'm playing with trpc and had an idea to expose the "where" block to the client so they can query whatever they like but using this technique I might need to omit some sensitive fields from the where block😅 what do you think?
@OsamaAburabie I'think it is definitly possible but it would require some work to implement it in a way that only the where
block is affected by the field omission. We'd need some rich-comment annotation like .omit([where])
that works on every validator type (like the array() validator) but is only added on where inputs. I'll keep it on my radar but I can not guarantee that I can implement it anytime soon. 😐
Is there a way to omit fields by the generator on "where" schemas for now it only does in on the "input" schemas.