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

Add non-null constraint for optional fields in GraphQL input types #244

Open
kobinarth-panchalingam opened this issue Jul 21, 2024 · 0 comments

Comments

@kobinarth-panchalingam
Copy link

When defining input types in GraphQL, using the non-null constraint on a field makes it required, which poses a challenge for optional fields that should not accept null values. We need a way to define optional fields that cannot be null if provided. For example, an email field should either be omitted or provided with a non-null value, but currently, the non-null constraint forces it to always be required.

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

1 participant