@@ -226,9 +226,9 @@ Note: Traditional non-nullable types will effectively become semantically
226226non-nullable when error propagation is disabled no matter which solution is
227227chosen, so this criteria is only concerned with traditionally nullable types.
228228
229- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
230- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
231- | ✅ | ✅ | ✅ | ✅ | 🚫👍 | ✅ |
229+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
230+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ----------------- |
231+ | ✅ | ✅ | ✅ | ✅ | 🚫👍 | ✅ | ✅ |
232232
233233Criteria score: 🥈
234234
@@ -240,9 +240,9 @@ Users should be able to adopt semantic nullability into an existing schema, and
240240when doing so all existing operations should remain valid, and should have the
241241same meaning as they always did.
242242
243- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
244- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
245- | ✅ | 🚫 | ✅ | ✅ | ✅ | ✅ |
243+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
244+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ----------------- |
245+ | ✅ | 🚫 | ✅ | ✅ | ✅ | ✅ | ✅ |
246246
247247Criteria score: 🥈
248248
@@ -254,9 +254,9 @@ GraphQL has been public for 10 years and there's a lot of content out there
254254noting that GraphQL types are nullable by default (unadorned type is nullable)
255255and our changes should not invalidate this content.
256256
257- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
258- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
259- | ✅ | 🚫 | ✅ | 🚫 | ✅ | ✅ |
257+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
258+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ----------------- |
259+ | ✅ | 🚫 | ✅ | 🚫 | ✅ | ✅ | ✅ |
260260
261261Criteria score: 🥉
262262
@@ -268,9 +268,9 @@ The GraphQL languages similarity to JSON is one of its strengths, making it
268268immediately feel familiar. Syntax used should feel obvious to developers new to
269269GraphQL.
270270
271- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
272- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
273- | 🚫 | ✅ | ✅ | ✅ | ⚠️ | ✅ |
271+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
272+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ------------- |
273+ | 🚫 | ✅ | ✅ | ✅ | ⚠️ | ✅ | ✅ |
274274
275275Criteria score: 🥇
276276
@@ -282,9 +282,9 @@ When a user wishes to replace the value for an input field or argument with a
282282variable in their GraphQL operation, the type syntax should be either identical
283283or similar, and should carry the same meaning.
284284
285- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
286- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
287- | ✅ | ✅ | ✅ | 🚫 | ✅ | ✅ |
285+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
286+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| -------------- |
287+ | ✅ | ✅ | ✅ | 🚫 | ✅ | ✅ | ✅ |
288288
289289Criteria score: 🥇
290290
@@ -295,9 +295,9 @@ Criteria score: 🥇
295295Where a proposal allows alternative syntaxes to be used, the two syntaxes should
296296not cause confusion.
297297
298- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
299- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
300- | ✅ | ✅ | ✅ | 🚫 | ✅ | ✅ |
298+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
299+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| -------------- |
300+ | ✅ | ✅ | ✅ | 🚫 | ✅ | ✅ | ✅ |
301301
302302Criteria score: 🥇
303303
@@ -311,9 +311,9 @@ still keep errors local to the same positions that they did when they were
311311published), allowing for the "partial success" feature of GraphQL to continue to
312312shine and not compromising the resiliency of legacy deployed app versions.
313313
314- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
315- | --------------- | --------------- | --------------- | --------------- | -----------------| -----------------|
316- | ✅ | ✅ | ✅ | ✅ | 🚫 | ✅ |
314+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
315+ | --------------- | --------------- | --------------- | --------------- | -----------------| -----------------| ------------- |
316+ | ✅ | ✅ | ✅ | ✅ | 🚫 | ✅ | ✅ |
317317
318318Criteria score: 🥈
319319
@@ -326,9 +326,9 @@ path for legacy apps, the tradeoff might be acceptable.
326326
327327The implementation required to make the proposal work should be simple.
328328
329- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
330- | --------------- | --------------- | --------------- | --------------- | -----------------| -----------------|
331- | ✅ | 🚫 | 🚫 | 🚫 | ✅ | ✅ |
329+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
330+ | --------------- | --------------- | --------------- | --------------- | -----------------| -----------------| -------------- |
331+ | ✅ | 🚫 | 🚫 | 🚫 | ✅ | ✅ | ✅ |
332332
333333Criteria score: 🥇
334334
@@ -341,9 +341,9 @@ since inputs never handle "errors" ("null only on error" is the same as "not
341341null" on input). As such, there's no benefit to clients for the syntax of
342342executable documents to change.
343343
344- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
345- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
346- | ✅ | ❔ | ✅ | 🚫 | ✅ | ✅ |
344+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
345+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ------------- |
346+ | ✅ | ❔ | ✅ | 🚫 | ✅ | ✅ | ✅ |
347347
348348Criteria score: 🥈
349349
@@ -355,9 +355,9 @@ The type of a field (`foo: Int`) can be determined by looking at the field and
355355its type; the reader should not have to read a document or schema directive to
356356determine how the type should be interpreted.
357357
358- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
359- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
360- | ✅ | ❔ | ⚠️ | 🚫 | ✅ | ⚠️ |
358+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
359+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ------------- |
360+ | ✅ | ❔ | ⚠️ | 🚫 | ✅ | ⚠️ | ✅ |
361361
362362Criteria score: 🥇
363363
@@ -367,9 +367,9 @@ Criteria score: 🥇
367367
368368We do not want to break existing tooling.
369369
370- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
371- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
372- | ✅ | ❔ | ✅ | ❔ | ✅ | ✅ |
370+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
371+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ------------- |
372+ | ✅ | ❔ | ✅ | ❔ | ✅ | ✅ | ✅ |
373373
374374Criteria score: 🥈
375375
@@ -383,9 +383,9 @@ to deal with nullable or non-nullable as presented to them by their client frame
383383
384384May contradict: M
385385
386- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
387- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
388- | ✅ | ❔ | ✅ | ❔ | ✅ | ⚠️ |
386+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
387+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| -------------- |
388+ | ✅ | ❔ | ✅ | ❔ | ✅ | ⚠️ | ✅ |
389389
390390Criteria score: 🥈
391391
@@ -399,9 +399,9 @@ schema SDL.
399399
400400May contradict: L
401401
402- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
403- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
404- | ⚠️ | ❔ | ⚠️ | ❔ | ✅ | ✅ |
402+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
403+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ------------- |
404+ | ⚠️ | ❔ | ⚠️ | ❔ | ✅ | ✅ | ✅ |
405405
406406Criteria score: 🥇
407407
@@ -415,9 +415,9 @@ that's only nullable because errors may occur. GraphQL-TOE can be used in such
415415situations so that codegen can safely use non-nullable types in semantically
416416non-nullable positions.
417417
418- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
419- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
420- | ✅ | ✅ | ✅ | ✅ | 🚫 | ✅ |
418+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
419+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ------------- |
420+ | ✅ | ✅ | ✅ | ✅ | 🚫 | ✅ | ✅ |
421421
422422Criteria score: 🥉
423423
@@ -435,9 +435,9 @@ Per Lee:
435435> allow inconsequential changes in behavior, but bubbling the error up isn't
436436> inconsequential.)
437437
438- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
439- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
440- | ✅ | ❔ | ✅ | ✅ | 🚫 | ✅ |
438+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
439+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ------------- |
440+ | ✅ | ❔ | ✅ | ✅ | 🚫 | ✅ | ✅ |
441441
442442
443443Note: though this criteria is currently not considered due to overlap with B
@@ -464,9 +464,9 @@ Per Benoit:
464464> an outcome of this whole effort I’d like to see happening.
465465
466466
467- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
468- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
469- | ✅ | ✅ | ✅ | ✅ | 🚫 | ⚠️ |
467+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
468+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ------------- |
469+ | ✅ | ✅ | ✅ | ✅ | 🚫 | ⚠️ | ✅ |
470470
471471Criteria score: 🥇
472472
@@ -478,9 +478,9 @@ The default (unadorned) type should be a type that you can migrate away from,
478478once nullability expectations become more concrete, without breaking existing
479479client queries.
480480
481- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
482- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
483- | ✅ | 🚫 | ✅ | 🚫 | ✅ | ✅ |
481+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
482+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ------------- |
483+ | ✅ | 🚫 | ✅ | 🚫 | ✅ | ✅ | ✅ |
484484
485485Note: this is not necessarily a duplicate of C as it doesn't specifically
486486require the unadorned type be nullable, however no proposal currently proposes
@@ -506,9 +506,9 @@ As such:
506506- the representation in introspection for inputs (namely the ` NON_NULL ` type
507507wrapper) should be unchanged
508508
509- | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] |
510- | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------|
511- | ✅ | ❔ | ✅ | 🚫 | ✅ | ✅ |
509+ | [ 1] [ solution-1 ] | [ 2] [ solution-2 ] | [ 3] [ solution-3 ] | [ 4] [ solution-4 ] | [ 5] [ solution-5 ] | [ 6] [ solution-6 ] | [ 7 ] [ solution-7 ] |
510+ | -----------------| -----------------| -----------------| -----------------| -----------------| -----------------| ------------- |
511+ | ✅ | ❔ | ✅ | 🚫 | ✅ | ✅ | ✅ |
512512
513513Criteria score: 🥈
514514
@@ -1003,3 +1003,63 @@ positions.
10031003 - ✅
10041004- [ R] [ criteria-r ]
10051005 - ✅ Directive is only valid on output positions.
1006+
1007+ ## 💡 7. ` @propagateError ` directive
1008+
1009+ [ solution-7 ] : #-7-propagateerror-directive
1010+
1011+ ** Champion** : @leebyron
1012+
1013+ Discussion: https://github.com/graphql/graphql-wg/discussions/1700
1014+
1015+ This proposal introduces a directive that can be added to fields to indicate that they should propagate errors.
1016+
1017+ ``` graphql
1018+ type Person {
1019+ id : ID ! @propagateError
1020+ name : String
1021+ age : Int
1022+ picture : Url
1023+ }
1024+ ```
1025+
1026+
1027+ ### ⚖️ Evaluation
1028+
1029+ - [A ][criteria -a ]
1030+ - ✅ semantically non -null without propagateError
1031+ - [B ][criteria -b ]
1032+ - ~✅ This is true when existing services must ensure propagateError is set when adopting this behavior .
1033+ - [C ][criteria -c ]
1034+ - ✅ Existing symbology unchanged .
1035+ - [D ][criteria -d ]
1036+ - ✅ No new symbols . No new types . Error bubbling was previously implicit behavior , now it is explicit .
1037+ - [E ][criteria -e ]
1038+ - ✅ No change to input types
1039+ - [F ][criteria -f ]
1040+ - ✅
1041+ - [G ][criteria -g ]
1042+ - ✅
1043+ - [H ][criteria -h ]
1044+ - ~✅ One new directive /introspection field . Behavior change is straightforward . Managing adoption /migration requires careful consideration .
1045+ - [I ][criteria -i ]
1046+ - ✅ This proposes no change to executable documents
1047+ - [J ][criteria -j ]
1048+ - ✅ The propagateError introspection /directive is local to the field (the optional propagateErrorOnAllNonNullFields config just does this for you).
1049+ - [K ][criteria -k ]
1050+ - ✅ Adds one new field . Migration path supports existing semantics for shipped clients .
1051+ - [L ][criteria -l ]
1052+ - ✅ There are only two types and they remain the same as they are today . This proposal is about changing error bubbling behavior , not nullability .
1053+ - [M ][criteria -m ]
1054+ - ✅ First party APIs have a clear path to introduce propagateError for all consumers .
1055+ - ⚠️ Third party APIs have a more challenging migration path , and may wish to expose different Schema to different clients .
1056+ - [N ][criteria -n ]
1057+ - ✅ Separating nullability from error bubbling allows for more control . Clients should preferably disable error bubbling , but even if they do not - this unlocks the ability for a semantically non -null type which does not error propagate .
1058+ - [O ][criteria -o ]
1059+ - ✅
1060+ - [P ][criteria -p ]
1061+ - ✅ This is technically not breaking , however note that changing field : Type to field : Type ! does introduce a new source of errors (which may be preferable!) Doing this without adding @propagateError is preferred , since changing field : Type to field : Type ! @propagateError , could lose data - and is exactly why this kind change is discouraged today .
1062+ - [Q ][criteria -q ]
1063+ - ✅
1064+ - [R ][criteria -r ]
1065+ - ✅ No proposed change to inputs
0 commit comments