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
## 🎯 N. Existing code generated tooling is backwards compatible with Introspection additions
325
325
326
326
For example, GraphiQL should successfully render when pointed at a schema which contains polymorphic input types. It should continue to function even if it can't support the polymorphic input type.
* ✅ Defaulting to the previous input type enables upgrading
399
399
* [J. A GraphQL schema that supports input unions can be queried by older GraphQL clients](#-j-a-graphql-schema-that-supports-input-unions-can-be-queried-by-older-graphql-clients)
400
400
* ✅ Changes are additive only
401
+
* [K. Input unions should be expressed efficiently in the query and on the wire](#-k-input-unions-should-be-expressed-efficiently-in-the-query-and-on-the-wire)
402
+
* ❔ Not evaluated
403
+
* [L. Input unions should be performant for servers](#-l-input-unions-should-be-performant-for-servers)
404
+
* ❔ Not evaluated
405
+
* [M. Existing SDL parsers are backwards compatible with SDL additions](#-m-existing-sdl-parsers-are-backwards-compatible-with-sdl-additions)
406
+
* ❔ Not evaluated
407
+
* [N. Existing code generated tooling is backwards compatible with Introspection additions](#-n-existing-code-generated-tooling-is-backwards-compatible-with-introspection-additions)
408
+
* ❔ Not evaluated
401
409
402
410
## 💡 2. Explicit configurable Discriminator field
403
411
@@ -526,6 +534,14 @@ input DogInput {
526
534
* ✅ Defaulting to the previous input type enables upgrading
527
535
* [J. A GraphQL schema that supports input unions can be queried by older GraphQL clients](#-j-a-graphql-schema-that-supports-input-unions-can-be-queried-by-older-graphql-clients)
528
536
* ✅ Changes are additive only
537
+
* [K. Input unions should be expressed efficiently in the query and on the wire](#-k-input-unions-should-be-expressed-efficiently-in-the-query-and-on-the-wire)
538
+
* ❔ Not evaluated
539
+
* [L. Input unions should be performant for servers](#-l-input-unions-should-be-performant-for-servers)
540
+
* ❔ Not evaluated
541
+
* [M. Existing SDL parsers are backwards compatible with SDL additions](#-m-existing-sdl-parsers-are-backwards-compatible-with-sdl-additions)
542
+
* ❔ Not evaluated
543
+
* [N. Existing code generated tooling is backwards compatible with Introspection additions](#-n-existing-code-generated-tooling-is-backwards-compatible-with-introspection-additions)
544
+
* ❔ Not evaluated
529
545
530
546
## 💡 3. Order based discrimination
531
547
@@ -603,6 +619,14 @@ type Mutation {
603
619
* ✅ Listing the old input type first enables enables upgrading
604
620
* [J. A GraphQL schema that supports input unions can be queried by older GraphQL clients](#-j-a-graphql-schema-that-supports-input-unions-can-be-queried-by-older-graphql-clients)
605
621
* ✅ Changes are additive only
622
+
* [K. Input unions should be expressed efficiently in the query and on the wire](#-k-input-unions-should-be-expressed-efficiently-in-the-query-and-on-the-wire)
623
+
* ❔ Not evaluated
624
+
* [L. Input unions should be performant for servers](#-l-input-unions-should-be-performant-for-servers)
625
+
* ❔ Not evaluated
626
+
* [M. Existing SDL parsers are backwards compatible with SDL additions](#-m-existing-sdl-parsers-are-backwards-compatible-with-sdl-additions)
627
+
* ❔ Not evaluated
628
+
* [N. Existing code generated tooling is backwards compatible with Introspection additions](#-n-existing-code-generated-tooling-is-backwards-compatible-with-introspection-additions)
* ✅ No migration required, as this pattern is already possible
750
782
*[J. A GraphQL schema that supports input unions can be queried by older GraphQL clients](#-j-a-graphql-schema-that-supports-input-unions-can-be-queried-by-older-graphql-clients)
751
783
* ✅ Changes are additive only
784
+
*[K. Input unions should be expressed efficiently in the query and on the wire](#-k-input-unions-should-be-expressed-efficiently-in-the-query-and-on-the-wire)
785
+
* ✅ Indication of the type can be done in 6 additional JSON characters per value (e.g. `{"a":VALUE_HERE}`) and would compress easily.
786
+
*[L. Input unions should be performant for servers](#-l-input-unions-should-be-performant-for-servers)
787
+
* ✅ Type is easily determined by looking up the specified field name
788
+
*[M. Existing SDL parsers are backwards compatible with SDL additions](#-m-existing-sdl-parsers-are-backwards-compatible-with-sdl-additions)
789
+
* ✅ Proposal uses a simple directive; directive parsing is widely supported
790
+
*[N. Existing code generated tooling is backwards compatible with Introspection additions](#-n-existing-code-generated-tooling-is-backwards-compatible-with-introspection-additions)
791
+
* ✅ Existing code generation tools will degrade gracefully to a regular input object
792
+
793
+
### Summary of spec changes
794
+
795
+
-**SDL**: enable use of `@oneOf` directive on input object type definitions
796
+
-**Introspection**: add `requiresExactlyOneField: Boolean` field to `__Type` type
797
+
-**Schema validation**: all fields on a `@oneOf` input type must be nullable, and must not have defaults
798
+
-**Operation validation**: when validating a `@oneOf` input object, assert that exactly one field was specified
752
799
800
+
[The full spec changes can be seen here](https://github.com/graphql/graphql-spec/pull/586/files).
753
801
754
802
# 🏆 Evaluation Overview
755
803
@@ -767,7 +815,7 @@ A quick glance at the evaluation results. Remember that passing or failing a spe
0 commit comments