Logo
GitHubDiscord

@semanticNonNullExperimental

@semanticNonNull allows marking fields that are never null unless there is a matching error in the errors array. This allows some tools to generate those types as non-null and make the client code simpler

More info: https://specs.apollo.dev/nullability/v0.4/#@semanticNonNull

Projects

Project Name Supported Since Note
Apollo Client N/A
Apollo Kotlin 4.0.0

doc

Apollo Router -
Apollo Server ?

Know the status of this feature? Let us know!

Apollo iOS -
Domain Graph Service (DGS) Framework -

discussion

GraphQL Code Generator 4.6.0

pr, release

GraphQL Java ?

Know the status of this feature? Let us know!

GraphQL Kotlin ?

Know the status of this feature? Let us know!

GraphQL Yoga -
GraphQL.js N/A

@semanticNonNull is not a built-in directive and will probably never be. It's only used as a transitional phase while tools migrate to onError: NULL.

GraphiQL ?

Know the status of this feature? Let us know!

Grats 0.0.12

doc, commit

Hive Gateway -
Hot Chocolate 14.0.0
Relay 18.0.0

doc

Spring for GraphQL ?

Know the status of this feature? Let us know!

gql.tada -

gql.tada supports its own client-controlled nullability directives (@_required and @_optional) since 1.1.0, but not semantic non-null.

urql N/A

urql does not perform schema-based type generation or nullability analysis.