diff --git a/rfcs/SemanticNullability.md b/rfcs/SemanticNullability.md index 0ab7278c..211e0a08 100644 --- a/rfcs/SemanticNullability.md +++ b/rfcs/SemanticNullability.md @@ -512,6 +512,60 @@ wrapper) should be unchanged Criteria score: 🥈 +## 🎯 S. Should be incrementally adoptable + +[criteria-s]: #-s-should-be-incrementally-adoptable + +We want to enable schema designers to solve developers pain points with the minimum of fuss; +large scale schema transforms are expensive - especially when they cascade to subschemas and/or schemas you don't control. +A schema designer should be able to mark an individual response position as semantically non-null without requiring a big lift. +Error-handling clients should see value from this very first interaction. + +| [1][solution-1] | [2][solution-2] | [3][solution-3] | [4][solution-4] | [5][solution-5] | [6][solution-6] | [7][solution-7] | [8][solution-8] | +| --------------- | --------------- | --------------- | --------------- |-----------------|-----------------|-----------------|-----------------| +| ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | 🚫 | ✅ | + +Criteria score: ❔ + +## 🎯 T. Should be incrementally removable + +[criteria-t]: #-t-should-be-incrementally-removable + +Once no legacy clients are using a field, +a schema designer should be able to update its types to use true nullability (removing its semantic nullability concerns) without impacting other fields that are still in use by legacy clients. +Over time, the number of fields having explicit semantic nullability markups should trend downwards. +No big-bang multi-subschema orchastrated transition should be required. + +| [1][solution-1] | [2][solution-2] | [3][solution-3] | [4][solution-4] | [5][solution-5] | [6][solution-6] | [7][solution-7] | [8][solution-8] | +| --------------- | --------------- | --------------- | --------------- |-----------------|-----------------|-----------------|-----------------| +| ✅ | ❔ | ❔ | ❔ | ❔ | ✅ | ❔ | ✅ | + +Criteria score: ❔ + +## 🎯 U. Legacy tooling and clients should safely interpret SDL even when ignoring directives + +[criteria-u]: #-u-legacy-tooling-and-clients-should-safely-interpret-sdl-even-when-ignoring-directives + +[Meta's evaluation of semantic nullability proposals](https://github.com/graphql/nullability-wg/discussions/98) has revealed that Meta deal heavily in SDL, +and that their various tooling ignores directives that they don't recognize. +A field such as solution 8's `foo: Int! @noPropagate` or solution 7's `foo: Int!` would be interpreted by existing such tooling as strictly non-nullable, +which is incorrect since these positions may be null on error. +This would require all tooling to be migrated before such solutions could be used. +It would be very hard to detect tooling that was missed if the syntax remained valid - issues would be discovered in production - so +if the response nullability would change then a syntax error should be thrown (which should score as ⚠️). + +For the avoidance of doubt: + +- Interpretting Semantic Non-Null as Nullable is safe for existing clients and tooling. +- Interpretting Semantic Non-Null as Non-Null is unsafe for existing clients and tooling. + +| [1][solution-1] | [2][solution-2] | [3][solution-3] | [4][solution-4] | [5][solution-5] | [6][solution-6] | [7][solution-7] | [8][solution-8] | +| --------------- | --------------- | --------------- | --------------- |-----------------|-----------------|-----------------|-----------------| +| ✅⚠️ | ❔ | ❔ | ❔ | ❔ | ✅ | 🚫 | ✅🚫 | + +Criteria score: ❔ + +