Skip to content

Make the unadorned type non-null? #1122

Open
@martinbonnin

Description

@martinbonnin

Edited in March 2025 to explicitly mention the unadorned type

This is a follow up from #63.

GraphQL best practices are currently to use nullable types by default.

This is reflected in the syntax by the fact that String is a nullable type. That is in contrast with languages like Swift and Kotlin where String is non-nullable and the nullable type has a ? modifier: String?.

With all the work going on in the nullability working group and the advent of semantic non null types, feels like now is a good time to revisit. Should the unadorned type be non-null?

This issue is for gathering community feedback and use cases. Would you rather keep the current unadorned type nullable by default? Or change it to non null by default?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions