Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions rfcs/SemanticNullability.md
Original file line number Diff line number Diff line change
Expand Up @@ -940,13 +940,18 @@ This proposal relies on the ability of clients to opt out of error propagation;

[solution-6]: #-6-semanticnonnull-directive

**Champion**: -
**Champion**: @benjie

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

This proposal (which is already adopted in a few places!) introduces a
directive that can be added to fields to indicate their semantic nullability
(and that of their nested list positions).
This proposal relies on:
- A new directive, `@semanticNonNull`
- Either:
- A new introspection argument, `includeSemanticNonNull` (`__Field.type(includeSemanticNonNull: Boolean! = false)`), if represented as a type, or
- A new introspection field, `__Field.semanticNonNullLevels: [Int!]`, if represented as field metadata

The directive (which is already adopted in a few places!) can be added to
fields to indicate their semantic nullability (and that of their nested list positions).

```graphql
directive @semanticNonNull(levels: [Int!]! = [0]) on FIELD_DEFINITION
Expand Down