You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## π‘ 3. New "Semantic Non-Null" type, usurping `!` syntax
446
619
@@ -505,6 +678,29 @@ day-to-day work.
505
678
- β Error capture positions unchanged when error propagation enabled
506
679
- [H][criteria-h]
507
680
- π« Implementation and spec simplicity.
681
+
- [I][criteria-i]
682
+
- β Semantic non-null not relevant to inputs, so no reason to use directive in executable documents -> syntax unchanged.
683
+
- [J][criteria-j]
684
+
- β οΈ Local reasoning holds for all but the schema authors; this is enabled
685
+
through the use of client-generated SDL reflecting client extensions and
686
+
error propagation behavior. For schema authors, local reasoning in the
687
+
source SDL returns whether a field is nullable or non-nullable, but does
688
+
not differentiate between _semantically_ non-nullable and _strictly_
689
+
non-nullable.
690
+
- [K][criteria-k]
691
+
- β Introspection backwards compatible via `__Field.type(includeSemanticNonNull: Boolean! = false)`
692
+
- [L][criteria-l]
693
+
- β Proposal encourages consumers to use client-produced SDL which only uses traditional nullability (`Type`/`Type!`)
694
+
- [M][criteria-m]
695
+
- β οΈ You can use the same SDL everywhere, but that's not what this solution
696
+
encourages.
697
+
- [N][criteria-n]
698
+
- β Indicates semantically non-null and strictly non-null types separately
699
+
- [O][criteria-o]
700
+
- β Client syntax unchanged
701
+
- [P][criteria-p]
702
+
- β There are no drawbacks to adding semantically non-nullable fields
703
+
508
704
509
705
## π‘ 4. New "Semantic Non-Null" type, with `?` used for nullable types
510
706
@@ -544,6 +740,23 @@ directive is present, and a `?` symbol is used to indicate a nullable position.
544
740
- β Error capture positions unchanged when error propagation enabled
545
741
- [H][criteria-h]
546
742
- π« Implementation and spec simplicity.
743
+
- [I][criteria-i]
744
+
- π« Clients will need to move to using new syntax (`Type?`/`Type`) or have syntax incongruent with schema SDL
745
+
- [J][criteria-j]
746
+
- π« The nullability of `Type` cannot be determined without checking for a document directive
747
+
- [K][criteria-k]
748
+
- β Introspection backwards compatible via `__Field.type(includeSemanticNonNull: Boolean! = false)`
749
+
- [L][criteria-l]
750
+
- β
751
+
- [M][criteria-m]
752
+
- β
753
+
- [N][criteria-n]
754
+
- β Indicates semantically non-null and strictly non-null types separately
755
+
- [O][criteria-o]
756
+
- β Clients must opt in to new syntax with document directive
757
+
- [P][criteria-p]
758
+
- β There are no drawbacks to adding semantically non-nullable fields
759
+
547
760
548
761
## π‘ 5. Use non-null in semantically non-nullable places and encourage disabling error propagation
549
762
@@ -571,3 +784,19 @@ This proposal relies on the ability of clients to opt out of error propagation;
571
784
- π« Using non-null in more positions will change the error boundary positions when error propagation is enabled.
572
785
- [H][criteria-h]
573
786
- β Implementation and spec simplicity.
787
+
- [I][criteria-i]
788
+
- β No change
789
+
- [J][criteria-j]
790
+
- β No change
791
+
- [K][criteria-k]
792
+
- β No change
793
+
- [L][criteria-l]
794
+
- β No change
795
+
- [M][criteria-m]
796
+
- β No change
797
+
- [N][criteria-n]
798
+
- π« Solution actually decreases value when error propagation is enabled due to lowered resilience to errors.
799
+
- [O][criteria-o]
800
+
- π« Changing fields to strictly non-null causes errors to propagate further, a breaking change. (Duplicate of G.)
801
+
- [P][criteria-p]
802
+
- π« Though the solution states it encourages the adoption of non-null, doing so is a breaking change for existing clients and so adopters are likely to hesitate when marking some semantically non-nullable positions as such
0 commit comments