graphql-platform
graphql-platform copied to clipboard
[Fusion] @semanticNonNull Support
This adds support for @semanticNonNull
to Fusion, both for composition and execution.
The parsing and formatting of both HotChocolate.Skimmed and HotChocolate.Language have been updated to parse the @semanticNonNull
directive as a new type definition node and to output this new type node as a directive again.
This should make it easier to transition later to a proper new operator instead of the directive.
Support for @semanticNonNull
in the Fusion composition & execution is enabled by default, as providing the directive in your schema is the opt-in.
Composition works in the following way:
- SemanticNonNull + Nullable = Nullable in the Fusion schema, since null is an expected value
- SemanticNonNull + NonNull = SemanticNonNull in the Fusion schema, the client will only ever interact with a SemanticNonNull as the NonNull would've already bubbled up in the other subgraph
- SemanticNonNull + SemanticNonNull = SemanticNonNull in the Fusion schema