Skip to content
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

Make input field explicitly null for input #78

Open
robertvansteen opened this issue Nov 5, 2018 · 1 comment
Open

Make input field explicitly null for input #78

robertvansteen opened this issue Nov 5, 2018 · 1 comment
Milestone

Comments

@robertvansteen
Copy link
Contributor

In 2.0 we check the default attributes for a model to see if we should make the input field nullable or not. So if the field is not nullable itself, setting a default attribute on the model will make the create input for that field nullable. This works fine for simple cases but if the default attribute is dynamic you might want to do this on the observer. I think we should respect this as the constraint that the field is not nullable will probably be on the database in that case.
I’m thinking of something like nullableOnCreation() that can be called on a field in the model scheme to define this behavior. Thoughts @erikgaal?

@robertvansteen robertvansteen transferred this issue from another repository Nov 5, 2018
@erikgaal
Copy link
Contributor

erikgaal commented Nov 5, 2018

Sounds reasonable!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants