-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's correct way to allow multiple types within a list type #569
Comments
From what I can tell looking into it; UnionType is what I should be using but the conversions from ModelTypes regularly end up in DataErrors for rogue fields, really these rogue fields should be returning a ConversionError at a glance? |
@naphta did you land on anything here? |
I didn't actually get around to trying to put a fix in place. I haven't really wanted to create user facing API validations since. |
I've been trying to figure it out and I've been through a few iterations and the documentation isn't really offering me much insight into how to do it.
Essentially I want a list type to allow data input from a number of predefined models, I've tried using UnionType, subclassing my models and using PolyModelType, and using MultiType. I'm not sure what I'm doing wrong but I'd just like to be able to give a complex data structure to a base model and have all the different lists of data validated.
The text was updated successfully, but these errors were encountered: