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

allow null or undefined as a constraint parameter on arrays #192

Open
petern160 opened this issue Aug 16, 2023 · 1 comment
Open

allow null or undefined as a constraint parameter on arrays #192

petern160 opened this issue Aug 16, 2023 · 1 comment

Comments

@petern160
Copy link

for array types can we have a constraint parameter that allows undefined or null values while constraining it to accept the minimum and maximum items

e.g. @constraint(minItems: 1, maxItems: 15, allowUndefinedOrNull: true)

@Synthetic-Dev
Copy link

this should probably be default behaviour based on the field type e.g.:
field: [String!] allows field to be null
field: [String]! allows field items to be null (should nulls count towards the item count though?)

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