Skip to content

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

@kobinarth-panchalingam

Description

@kobinarth-panchalingam

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions