-
-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
97 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...Chocolate/Fusion-vnext/src/Fusion.Composition/Properties/CompositionResources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...n-vnext/src/Fusion.Composition/SourceSchemaValidationRules/RequireInvalidFieldTypeRule.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using HotChocolate.Fusion.Events; | ||
using HotChocolate.Fusion.Events.Contracts; | ||
using static HotChocolate.Fusion.Logging.LogEntryHelper; | ||
|
||
namespace HotChocolate.Fusion.SourceSchemaValidationRules; | ||
|
||
/// <summary> | ||
/// When using the <c>@require</c> directive, the <c>field</c> argument must always be a string that | ||
/// defines a (potentially nested) selection set of fields from the same type. If the <c>field</c> | ||
/// argument is provided as a type other than a string (such as an integer, boolean, or enum), the | ||
/// directive usage is invalid and will cause schema composition to fail. | ||
/// </summary> | ||
/// <seealso href="https://graphql.github.io/composite-schemas-spec/draft/#sec-Require-Invalid-Field-Type"> | ||
/// Specification | ||
/// </seealso> | ||
internal sealed class RequireInvalidFieldTypeRule : IEventHandler<RequireFieldInvalidTypeEvent> | ||
{ | ||
public void Handle(RequireFieldInvalidTypeEvent @event, CompositionContext context) | ||
{ | ||
var (requireDirective, argument, field, type, schema) = @event; | ||
|
||
context.Log.Write( | ||
RequireInvalidFieldType( | ||
requireDirective, | ||
argument.Name, | ||
field.Name, | ||
type.Name, | ||
schema)); | ||
} | ||
} |
30 changes: 0 additions & 30 deletions
30
...-vnext/src/Fusion.Composition/SourceSchemaValidationRules/RequireInvalidFieldsTypeRule.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.