Skip to content

Commit e163f27

Browse files
authored
Merge pull request #11 from snifter/master
Support for HotChocolate v14
2 parents f10f44f + caa36d6 commit e163f27

10 files changed

+37
-17
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ $tf/
127127
# Guidance Automation Toolkit
128128
*.gpState
129129

130+
# JetBrains IDE files
131+
.idea/
132+
130133
# ReSharper is a .NET coding add-in
131134
_ReSharper*/
132135
*.[Rr]e[Ss]harper

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ As HotChocolate doesn't validate input arguments, After installing this package,
1414

1515
**Installation Note**:
1616

17+
Use Graph.ArgumentValidator v4.0.0 if you are using HotChocolate v14.
18+
1719
Use Graph.ArgumentValidator v3.0.0 if you are using HotChocolate v13.
1820

1921
Use Graph.ArgumentValidator v2.0.0 if you are using HotChocolate v12.

Sample/Sample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="HotChocolate.AspNetCore" Version="13.7.0" />
10+
<PackageReference Include="HotChocolate.AspNetCore" Version="14.3.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

src/Directory.Build.props

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
<PackageId>$(MSBuildProjectName)</PackageId>
1717
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1818

19-
<Version>3.0.0</Version>
20-
21-
<LibraryTargetFrameworks>net6.0;net5.0; netcoreapp3.1; netstandard2.0</LibraryTargetFrameworks>
22-
<TestTargetFrameworks>net6.0;net5.0; netcoreapp3.1; netcoreapp2.1</TestTargetFrameworks>
19+
<Version>4.0.0</Version>
2320
</PropertyGroup>
2421
</Project>

src/Graph.ArgumentValidator.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<Project Sdk="Microsoft.NET.Sdk">
33

44
<PropertyGroup>
5-
<TargetFrameworks>$(LibraryTargetFrameworks)</TargetFrameworks>
6-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFrameworks>net8.0; net6.0</TargetFrameworks>
6+
<ExtendedTargetFrameworks>net8.0; net6.0; netstandard2.0</ExtendedTargetFrameworks>
77
<PackageTags>HotChocolate.Validator, HotChocolate, GraphQL</PackageTags>
88
<PackageIcon>icon.png</PackageIcon>
99
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="HotChocolate.Execution" Version="13.7.0" />
15+
<PackageReference Include="HotChocolate.Execution" Version="14.3.0" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

test/Graph.ArgumentValidator.Tests.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Snapshooter.Xunit" Version="0.13.0" />
10+
<PackageReference Include="Snapshooter.Xunit" Version="1.0.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
15-
<PackageReference Include="xunit" Version="2.6.1" />
16-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
15+
<PackageReference Include="xunit" Version="2.9.2" />
16+
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.0">
1717
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1818
<PrivateAssets>all</PrivateAssets>
1919
</PackageReference>
20-
<PackageReference Include="coverlet.collector" Version="6.0.0">
20+
<PackageReference Include="coverlet.collector" Version="6.0.3">
2121
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2222
<PrivateAssets>all</PrivateAssets>
2323
</PackageReference>

test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_Arguments.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
"errors": [
33
{
44
"message": "The String field is not a valid e-mail address.",
5+
"locations": [
6+
{
7+
"line": 1,
8+
"column": 3
9+
}
10+
],
511
"path": [
612
"email"
713
],

test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_DuplicateEmail.snap

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
"errors": [
33
{
44
"message": "Email already exist",
5+
"locations": [
6+
{
7+
"line": 1,
8+
"column": 3
9+
}
10+
],
511
"path": [
612
"email"
713
],
@@ -13,4 +19,4 @@
1319
"data": {
1420
"checkDuplicateEmail": null
1521
}
16-
}
22+
}

test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_InputObjects.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
"errors": [
33
{
44
"message": "The Email field is not a valid e-mail address.",
5+
"locations": [
6+
{
7+
"line": 1,
8+
"column": 3
9+
}
10+
],
511
"path": [
612
"input"
713
],

test/__snapshots__/ValidationTests.Ensure_Validation_Works_On_StudentWithOutScoreCard.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"errors": [
33
{
4-
"message": "\u0060scoreCard\u0060 is a required field and cannot be null.",
4+
"message": "`scoreCard` is a required field and cannot be null.",
55
"locations": [
66
{
77
"line": 1,
@@ -13,7 +13,7 @@
1313
],
1414
"extensions": {
1515
"field": "scoreCard",
16-
"specifiedBy": "http://spec.graphql.org/October2021/#sec-Input-Object-Required-Fields"
16+
"specifiedBy": "https://spec.graphql.org/October2021/#sec-Input-Object-Required-Fields"
1717
}
1818
}
1919
]

0 commit comments

Comments
 (0)