From c127549743b61141e556ddd00e0747026f3bf64d Mon Sep 17 00:00:00 2001 From: snifter Date: Tue, 31 Dec 2024 12:12:47 +0100 Subject: [PATCH 1/5] .idea folder added to gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 9491a2f..5289527 100644 --- a/.gitignore +++ b/.gitignore @@ -127,6 +127,9 @@ $tf/ # Guidance Automation Toolkit *.gpState +# JetBrains IDE files +.idea/ + # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper From 89fc7d98e51de3c6c2ea7554e3a0cc84201d3273 Mon Sep 17 00:00:00 2001 From: snifter Date: Tue, 31 Dec 2024 12:30:29 +0100 Subject: [PATCH 2/5] target frameworks clean up --- src/Directory.Build.props | 3 --- src/Graph.ArgumentValidator.csproj | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 9e6616f..af348a0 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -17,8 +17,5 @@ MIT 3.0.0 - - net6.0;net5.0; netcoreapp3.1; netstandard2.0 - net6.0;net5.0; netcoreapp3.1; netcoreapp2.1 diff --git a/src/Graph.ArgumentValidator.csproj b/src/Graph.ArgumentValidator.csproj index 5c46c3d..584cc85 100644 --- a/src/Graph.ArgumentValidator.csproj +++ b/src/Graph.ArgumentValidator.csproj @@ -2,7 +2,8 @@ - $(LibraryTargetFrameworks) + net6.0; + net6.0; netstandard2.0 net6.0 HotChocolate.Validator, HotChocolate, GraphQL icon.png From 04ad82b3e890ed005888e8f70156d59796ae580b Mon Sep 17 00:00:00 2001 From: snifter Date: Tue, 31 Dec 2024 12:42:21 +0100 Subject: [PATCH 3/5] .net8.0 added; tests dependencies upgraded --- src/Graph.ArgumentValidator.csproj | 5 ++--- test/Graph.ArgumentValidator.Tests.csproj | 12 ++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Graph.ArgumentValidator.csproj b/src/Graph.ArgumentValidator.csproj index 584cc85..ac13228 100644 --- a/src/Graph.ArgumentValidator.csproj +++ b/src/Graph.ArgumentValidator.csproj @@ -2,9 +2,8 @@ - net6.0; - net6.0; netstandard2.0 - net6.0 + net8.0; net6.0 + net8.0; net6.0; netstandard2.0 HotChocolate.Validator, HotChocolate, GraphQL icon.png true diff --git a/test/Graph.ArgumentValidator.Tests.csproj b/test/Graph.ArgumentValidator.Tests.csproj index ed2504e..79f75c9 100644 --- a/test/Graph.ArgumentValidator.Tests.csproj +++ b/test/Graph.ArgumentValidator.Tests.csproj @@ -1,23 +1,23 @@  - net6.0 + net8.0 false - + - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all From f0f106ed7c7976c56e70333480e0dee83a058282 Mon Sep 17 00:00:00 2001 From: snifter Date: Tue, 31 Dec 2024 12:59:21 +0100 Subject: [PATCH 4/5] HotChocolate v14 support added --- Sample/Sample.csproj | 2 +- src/Graph.ArgumentValidator.csproj | 2 +- ...idationTests.Ensure_Validation_Works_On_Arguments.snap | 6 ++++++ ...onTests.Ensure_Validation_Works_On_DuplicateEmail.snap | 8 +++++++- ...tionTests.Ensure_Validation_Works_On_InputObjects.snap | 6 ++++++ ...nsure_Validation_Works_On_StudentWithOutScoreCard.snap | 4 ++-- 6 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Sample/Sample.csproj b/Sample/Sample.csproj index acca035..7b52416 100644 --- a/Sample/Sample.csproj +++ b/Sample/Sample.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/Graph.ArgumentValidator.csproj b/src/Graph.ArgumentValidator.csproj index ac13228..763a3a8 100644 --- a/src/Graph.ArgumentValidator.csproj +++ b/src/Graph.ArgumentValidator.csproj @@ -12,7 +12,7 @@ - + diff --git a/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_Arguments.snap b/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_Arguments.snap index 93fc106..b3b9dda 100644 --- a/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_Arguments.snap +++ b/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_Arguments.snap @@ -2,6 +2,12 @@ "errors": [ { "message": "The String field is not a valid e-mail address.", + "locations": [ + { + "line": 1, + "column": 3 + } + ], "path": [ "email" ], diff --git a/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_DuplicateEmail.snap b/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_DuplicateEmail.snap index 545bc67..4cff200 100644 --- a/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_DuplicateEmail.snap +++ b/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_DuplicateEmail.snap @@ -2,6 +2,12 @@ "errors": [ { "message": "Email already exist", + "locations": [ + { + "line": 1, + "column": 3 + } + ], "path": [ "email" ], @@ -13,4 +19,4 @@ "data": { "checkDuplicateEmail": null } -} \ No newline at end of file +} diff --git a/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_InputObjects.snap b/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_InputObjects.snap index d6290b2..7f9fa15 100644 --- a/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_InputObjects.snap +++ b/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_InputObjects.snap @@ -2,6 +2,12 @@ "errors": [ { "message": "The Email field is not a valid e-mail address.", + "locations": [ + { + "line": 1, + "column": 3 + } + ], "path": [ "input" ], diff --git a/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_StudentWithOutScoreCard.snap b/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_StudentWithOutScoreCard.snap index 92e2085..774920c 100644 --- a/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_StudentWithOutScoreCard.snap +++ b/test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_StudentWithOutScoreCard.snap @@ -1,7 +1,7 @@ { "errors": [ { - "message": "\u0060scoreCard\u0060 is a required field and cannot be null.", + "message": "`scoreCard` is a required field and cannot be null.", "locations": [ { "line": 1, @@ -13,7 +13,7 @@ ], "extensions": { "field": "scoreCard", - "specifiedBy": "http://spec.graphql.org/October2021/#sec-Input-Object-Required-Fields" + "specifiedBy": "https://spec.graphql.org/October2021/#sec-Input-Object-Required-Fields" } } ] From caa36d6238ccbbd669b13b769d9cb72591cde904 Mon Sep 17 00:00:00 2001 From: snifter Date: Tue, 31 Dec 2024 13:02:17 +0100 Subject: [PATCH 5/5] v.4.0.0 --- README.md | 2 ++ src/Directory.Build.props | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c6bcaf..f60e939 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ As HotChocolate doesn't validate input arguments, After installing this package, **Installation Note**: +Use Graph.ArgumentValidator v4.0.0 if you are using HotChocolate v14. + Use Graph.ArgumentValidator v3.0.0 if you are using HotChocolate v13. Use Graph.ArgumentValidator v2.0.0 if you are using HotChocolate v12. diff --git a/src/Directory.Build.props b/src/Directory.Build.props index af348a0..7cb1655 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -16,6 +16,6 @@ $(MSBuildProjectName) MIT - 3.0.0 + 4.0.0