From 246034cc22d453408e9b8b708472916fa04e5f8c Mon Sep 17 00:00:00 2001 From: Glen Date: Fri, 10 Apr 2026 12:36:52 +0200 Subject: [PATCH] Fix spec URLs --- .../Validation/DirectiveValidationRule.cs | 2 +- .../Core/src/Types/Utilities/ErrorHelper.cs | 2 +- ...eTests.RejectArgumentsWithInvalidName.snap | 2 +- ...eTests.RejectDirectiveWithInvalidName.snap | 2 +- ...ejectRequiredArgumentThatIsDeprecated.snap | 2 +- ...edInputTypes_NonNullableField_Invalid.snap | 2 +- ...edInputTypes_NonNullableField_Invalid.snap | 2 +- ...tedDirective_NonNullableField_Invalid.snap | 2 +- ...RootFieldTests.Defer_On_Mutation_Root.snap | 84 ------------------- ...r_On_Mutation_Root_In_Nested_Fragment.snap | 84 ------------------- ...inedRuleTests.WithMisplacedDirectives.snap | 8 +- ...iteLoopOnImmediatelyRecursiveFragment.snap | 2 +- ...oesNotInfiniteLoopOnRecursiveFragment.snap | 2 +- ...teLoopOnTransitivelyRecursiveFragment.snap | 2 +- 14 files changed, 15 insertions(+), 183 deletions(-) delete mode 100644 src/HotChocolate/Core/test/Validation.Tests/__snapshots__/DeferAndStreamDirectivesAreUsedOnValidRootFieldTests.Defer_On_Mutation_Root.snap delete mode 100644 src/HotChocolate/Core/test/Validation.Tests/__snapshots__/DeferAndStreamDirectivesAreUsedOnValidRootFieldTests.Defer_On_Mutation_Root_In_Nested_Fragment.snap diff --git a/src/HotChocolate/Core/src/Types/Configuration/Validation/DirectiveValidationRule.cs b/src/HotChocolate/Core/src/Types/Configuration/Validation/DirectiveValidationRule.cs index 656fa683598..c55c8242e7b 100644 --- a/src/HotChocolate/Core/src/Types/Configuration/Validation/DirectiveValidationRule.cs +++ b/src/HotChocolate/Core/src/Types/Configuration/Validation/DirectiveValidationRule.cs @@ -7,7 +7,7 @@ namespace HotChocolate.Configuration.Validation; /// /// Implements directive type validation defined in the spec. -/// https://spec.graphql.org/draft/#sec-Type-System.Directives.Validation +/// https://spec.graphql.org/September2025/#sec-Type-System.Directives.Type-Validation /// internal sealed class DirectiveValidationRule : ISchemaValidationRule { diff --git a/src/HotChocolate/Core/src/Types/Utilities/ErrorHelper.cs b/src/HotChocolate/Core/src/Types/Utilities/ErrorHelper.cs index 5c2cb3415f5..15e2c1cc94e 100644 --- a/src/HotChocolate/Core/src/Types/Utilities/ErrorHelper.cs +++ b/src/HotChocolate/Core/src/Types/Utilities/ErrorHelper.cs @@ -13,7 +13,7 @@ internal static class ErrorHelper private const string InterfaceTypeValidation = "sec-Interfaces.Type-Validation"; private const string ObjectTypeValidation = "sec-Objects.Type-Validation"; private const string InputObjectTypeValidation = "sec-Input-Objects.Type-Validation"; - private const string DirectiveValidation = "sec-Type-System.Directives.Validation"; + private const string DirectiveValidation = "sec-Type-System.Directives.Type-Validation"; public static ISchemaError NeedsOneAtLeastField(ITypeDefinition type) => SchemaErrorBuilder.New() diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Validation/__snapshots__/DirectiveValidationRuleTests.RejectArgumentsWithInvalidName.snap b/src/HotChocolate/Core/test/Types.Tests/Types/Validation/__snapshots__/DirectiveValidationRuleTests.RejectArgumentsWithInvalidName.snap index 1e93e1f4cbc..c5b08c2e75b 100644 --- a/src/HotChocolate/Core/test/Types.Tests/Types/Validation/__snapshots__/DirectiveValidationRuleTests.RejectArgumentsWithInvalidName.snap +++ b/src/HotChocolate/Core/test/Types.Tests/Types/Validation/__snapshots__/DirectiveValidationRuleTests.RejectArgumentsWithInvalidName.snap @@ -2,7 +2,7 @@ "message": "Argument names starting with `__` are reserved for the GraphQL specification.", "extensions": { "argument": "__badArg", - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Type-System.Directives.Validation" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Type-System.Directives.Type-Validation" } } diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Validation/__snapshots__/DirectiveValidationRuleTests.RejectDirectiveWithInvalidName.snap b/src/HotChocolate/Core/test/Types.Tests/Types/Validation/__snapshots__/DirectiveValidationRuleTests.RejectDirectiveWithInvalidName.snap index 962a629d590..5d8e62c543c 100644 --- a/src/HotChocolate/Core/test/Types.Tests/Types/Validation/__snapshots__/DirectiveValidationRuleTests.RejectDirectiveWithInvalidName.snap +++ b/src/HotChocolate/Core/test/Types.Tests/Types/Validation/__snapshots__/DirectiveValidationRuleTests.RejectDirectiveWithInvalidName.snap @@ -1,7 +1,7 @@ { "message": "Names starting with `__` are reserved for the GraphQL specification.", "extensions": { - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Type-System.Directives.Validation" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Type-System.Directives.Type-Validation" } } diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/Validation/__snapshots__/DirectiveValidationRuleTests.RejectRequiredArgumentThatIsDeprecated.snap b/src/HotChocolate/Core/test/Types.Tests/Types/Validation/__snapshots__/DirectiveValidationRuleTests.RejectRequiredArgumentThatIsDeprecated.snap index c4c79951e23..326bb1bf6d6 100644 --- a/src/HotChocolate/Core/test/Types.Tests/Types/Validation/__snapshots__/DirectiveValidationRuleTests.RejectRequiredArgumentThatIsDeprecated.snap +++ b/src/HotChocolate/Core/test/Types.Tests/Types/Validation/__snapshots__/DirectiveValidationRuleTests.RejectRequiredArgumentThatIsDeprecated.snap @@ -3,7 +3,7 @@ "extensions": { "argument": "badArg", "rfc": "https://github.com/graphql/graphql-spec/pull/805", - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Type-System.Directives.Validation" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Type-System.Directives.Type-Validation" } } diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/DirectiveTypeTests.AnnotationBased_DeprecatedInputTypes_NonNullableField_Invalid.snap b/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/DirectiveTypeTests.AnnotationBased_DeprecatedInputTypes_NonNullableField_Invalid.snap index 69b7c3a95a2..db76cb0dd2a 100644 --- a/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/DirectiveTypeTests.AnnotationBased_DeprecatedInputTypes_NonNullableField_Invalid.snap +++ b/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/DirectiveTypeTests.AnnotationBased_DeprecatedInputTypes_NonNullableField_Invalid.snap @@ -3,6 +3,6 @@ "extensions": { "argument": "obsoleteWithReason", "rfc": "https://github.com/graphql/graphql-spec/pull/805", - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Type-System.Directives.Validation" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Type-System.Directives.Type-Validation" } } diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/DirectiveTypeTests.CodeFirst_DeprecatedInputTypes_NonNullableField_Invalid.snap b/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/DirectiveTypeTests.CodeFirst_DeprecatedInputTypes_NonNullableField_Invalid.snap index 4dd2ff7a380..da9dc4515b9 100644 --- a/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/DirectiveTypeTests.CodeFirst_DeprecatedInputTypes_NonNullableField_Invalid.snap +++ b/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/DirectiveTypeTests.CodeFirst_DeprecatedInputTypes_NonNullableField_Invalid.snap @@ -3,6 +3,6 @@ "extensions": { "argument": "bar", "rfc": "https://github.com/graphql/graphql-spec/pull/805", - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Type-System.Directives.Validation" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Type-System.Directives.Type-Validation" } } diff --git a/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/DirectiveTypeTests.SchemaFirst_DeprecatedDirective_NonNullableField_Invalid.snap b/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/DirectiveTypeTests.SchemaFirst_DeprecatedDirective_NonNullableField_Invalid.snap index 4dd2ff7a380..da9dc4515b9 100644 --- a/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/DirectiveTypeTests.SchemaFirst_DeprecatedDirective_NonNullableField_Invalid.snap +++ b/src/HotChocolate/Core/test/Types.Tests/Types/__snapshots__/DirectiveTypeTests.SchemaFirst_DeprecatedDirective_NonNullableField_Invalid.snap @@ -3,6 +3,6 @@ "extensions": { "argument": "bar", "rfc": "https://github.com/graphql/graphql-spec/pull/805", - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Type-System.Directives.Validation" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Type-System.Directives.Type-Validation" } } diff --git a/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/DeferAndStreamDirectivesAreUsedOnValidRootFieldTests.Defer_On_Mutation_Root.snap b/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/DeferAndStreamDirectivesAreUsedOnValidRootFieldTests.Defer_On_Mutation_Root.snap deleted file mode 100644 index 4d5befbb0fe..00000000000 --- a/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/DeferAndStreamDirectivesAreUsedOnValidRootFieldTests.Defer_On_Mutation_Root.snap +++ /dev/null @@ -1,84 +0,0 @@ -[ - { - "Message": "The defer and stream directives are not allowed to be used on root fields of the mutation or subscription type.", - "Code": null, - "Path": null, - "Locations": [ - { - "Line": 2, - "Column": 17 - } - ], - "Extensions": { - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Defer-And-Stream-Directives-Are-Used-On-Valid-Root-Field" - }, - "Exception": null, - "SyntaxNode": { - "Kind": "InlineFragment", - "Location": { - "Start": 31, - "End": 121, - "Line": 2, - "Column": 17 - }, - "TypeCondition": null, - "Directives": [ - { - "Kind": "Directive", - "Location": { - "Start": 35, - "End": 43, - "Line": 2, - "Column": 21 - }, - "Name": { - "Kind": "Name", - "Location": { - "Start": 36, - "End": 43, - "Line": 2, - "Column": 22 - }, - "Value": "defer" - }, - "Arguments": [] - } - ], - "SelectionSet": { - "Kind": "SelectionSet", - "Location": { - "Start": 42, - "End": 121, - "Line": 2, - "Column": 28 - }, - "Selections": [ - { - "Kind": "Field", - "Alias": null, - "Arguments": [], - "Required": null, - "SelectionSet": null, - "Location": { - "Start": 64, - "End": 107, - "Line": 3, - "Column": 21 - }, - "Name": { - "Kind": "Name", - "Location": { - "Start": 64, - "End": 107, - "Line": 3, - "Column": 21 - }, - "Value": "disallowedSecondRootField" - }, - "Directives": [] - } - ] - } - } - } -] diff --git a/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/DeferAndStreamDirectivesAreUsedOnValidRootFieldTests.Defer_On_Mutation_Root_In_Nested_Fragment.snap b/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/DeferAndStreamDirectivesAreUsedOnValidRootFieldTests.Defer_On_Mutation_Root_In_Nested_Fragment.snap deleted file mode 100644 index 9e3caa51a8f..00000000000 --- a/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/DeferAndStreamDirectivesAreUsedOnValidRootFieldTests.Defer_On_Mutation_Root_In_Nested_Fragment.snap +++ /dev/null @@ -1,84 +0,0 @@ -[ - { - "Message": "The defer and stream directives are not allowed to be used on root fields of the mutation or subscription type.", - "Code": null, - "Path": null, - "Locations": [ - { - "Line": 10, - "Column": 17 - } - ], - "Extensions": { - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Defer-And-Stream-Directives-Are-Used-On-Valid-Root-Field" - }, - "Exception": null, - "SyntaxNode": { - "Kind": "InlineFragment", - "Location": { - "Start": 187, - "End": 277, - "Line": 10, - "Column": 17 - }, - "TypeCondition": null, - "Directives": [ - { - "Kind": "Directive", - "Location": { - "Start": 191, - "End": 199, - "Line": 10, - "Column": 21 - }, - "Name": { - "Kind": "Name", - "Location": { - "Start": 192, - "End": 199, - "Line": 10, - "Column": 22 - }, - "Value": "defer" - }, - "Arguments": [] - } - ], - "SelectionSet": { - "Kind": "SelectionSet", - "Location": { - "Start": 198, - "End": 277, - "Line": 10, - "Column": 28 - }, - "Selections": [ - { - "Kind": "Field", - "Alias": null, - "Arguments": [], - "Required": null, - "SelectionSet": null, - "Location": { - "Start": 220, - "End": 263, - "Line": 11, - "Column": 21 - }, - "Name": { - "Kind": "Name", - "Location": { - "Start": 220, - "End": 263, - "Line": 11, - "Column": 21 - }, - "Value": "disallowedSecondRootField" - }, - "Directives": [] - } - ] - } - } - } -] diff --git a/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/DirectivesAreDefinedRuleTests.WithMisplacedDirectives.snap b/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/DirectivesAreDefinedRuleTests.WithMisplacedDirectives.snap index bc6f1e0ee18..93f527cb902 100644 --- a/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/DirectivesAreDefinedRuleTests.WithMisplacedDirectives.snap +++ b/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/DirectivesAreDefinedRuleTests.WithMisplacedDirectives.snap @@ -11,7 +11,7 @@ ], "Exception": null, "Extensions": { - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Directives-Are-In-Valid-Locations" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Directives-Are-in-Valid-Locations" } }, { @@ -28,7 +28,7 @@ ], "Exception": null, "Extensions": { - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Directives-Are-In-Valid-Locations" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Directives-Are-in-Valid-Locations" } }, { @@ -45,7 +45,7 @@ ], "Exception": null, "Extensions": { - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Directives-Are-In-Valid-Locations" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Directives-Are-in-Valid-Locations" } }, { @@ -62,7 +62,7 @@ ], "Exception": null, "Extensions": { - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Directives-Are-In-Valid-Locations" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Directives-Are-in-Valid-Locations" } } ] diff --git a/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/FieldSelectionMergingRuleTests.DoesNotInfiniteLoopOnImmediatelyRecursiveFragment.snap b/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/FieldSelectionMergingRuleTests.DoesNotInfiniteLoopOnImmediatelyRecursiveFragment.snap index eb1ac0a7339..83b4ca6d197 100644 --- a/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/FieldSelectionMergingRuleTests.DoesNotInfiniteLoopOnImmediatelyRecursiveFragment.snap +++ b/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/FieldSelectionMergingRuleTests.DoesNotInfiniteLoopOnImmediatelyRecursiveFragment.snap @@ -13,7 +13,7 @@ "type": "Query", "field": "", "responseName": "", - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Field-Selections-on-Objects-Interfaces-and-Unions-Types" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Field-Selections" }, "Exception": null } diff --git a/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/FieldSelectionMergingRuleTests.DoesNotInfiniteLoopOnRecursiveFragment.snap b/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/FieldSelectionMergingRuleTests.DoesNotInfiniteLoopOnRecursiveFragment.snap index eb1ac0a7339..83b4ca6d197 100644 --- a/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/FieldSelectionMergingRuleTests.DoesNotInfiniteLoopOnRecursiveFragment.snap +++ b/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/FieldSelectionMergingRuleTests.DoesNotInfiniteLoopOnRecursiveFragment.snap @@ -13,7 +13,7 @@ "type": "Query", "field": "", "responseName": "", - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Field-Selections-on-Objects-Interfaces-and-Unions-Types" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Field-Selections" }, "Exception": null } diff --git a/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/FieldSelectionMergingRuleTests.DoesNotInfiniteLoopOnTransitivelyRecursiveFragment.snap b/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/FieldSelectionMergingRuleTests.DoesNotInfiniteLoopOnTransitivelyRecursiveFragment.snap index eb1ac0a7339..83b4ca6d197 100644 --- a/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/FieldSelectionMergingRuleTests.DoesNotInfiniteLoopOnTransitivelyRecursiveFragment.snap +++ b/src/HotChocolate/Core/test/Validation.Tests/__snapshots__/FieldSelectionMergingRuleTests.DoesNotInfiniteLoopOnTransitivelyRecursiveFragment.snap @@ -13,7 +13,7 @@ "type": "Query", "field": "", "responseName": "", - "specifiedBy": "https://spec.graphql.org/September2025/#sec-Field-Selections-on-Objects-Interfaces-and-Unions-Types" + "specifiedBy": "https://spec.graphql.org/September2025/#sec-Field-Selections" }, "Exception": null }