Replies: 2 comments 4 replies
-
We don't have Pick yet unfortunately. We have Omit, though it's done with a mutating decorator which is questionably good. That said, you could look at how that works and implement something similar for Omit. Alternatively, you can pull out e.g. id and weight into a separate model and spread it in where needed. |
Beta Was this translation helpful? Give feedback.
4 replies
-
The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The usecase is that we have models that are used by different apis, sometimes with only a subset of the properties. For example, emitting CustomerCreated events to a webhook that only include id, name, email from Customer.
I could create BaseCustomer and have multiple things extend it, but maybe there's another way?
e.g.
Beta Was this translation helpful? Give feedback.
All reactions