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 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/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/Directory.Build.props b/src/Directory.Build.props index 9e6616f..7cb1655 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -16,9 +16,6 @@ $(MSBuildProjectName) MIT - 3.0.0 - - net6.0;net5.0; netcoreapp3.1; netstandard2.0 - net6.0;net5.0; netcoreapp3.1; netcoreapp2.1 + 4.0.0 diff --git a/src/Graph.ArgumentValidator.csproj b/src/Graph.ArgumentValidator.csproj index 5c46c3d..763a3a8 100644 --- a/src/Graph.ArgumentValidator.csproj +++ b/src/Graph.ArgumentValidator.csproj @@ -2,8 +2,8 @@ - $(LibraryTargetFrameworks) - net6.0 + net8.0; net6.0 + net8.0; net6.0; netstandard2.0 HotChocolate.Validator, HotChocolate, GraphQL icon.png true @@ -12,7 +12,7 @@ - + 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 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" } } ]