Skip to content

Commit

Permalink
added HotChocolate v13 support
Browse files Browse the repository at this point in the history
  • Loading branch information
VarunSaiTeja committed Nov 7, 2023
1 parent e3e9a95 commit 0f643ec
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Sample/Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HotChocolate.AspNetCore" Version="13.2.1" />
<PackageReference Include="HotChocolate.AspNetCore" Version="13.7.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Shared/Shared.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Graph.ArgumentValidator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

<PropertyGroup>
<TargetFrameworks>$(LibraryTargetFrameworks)</TargetFrameworks>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<PackageTags>HotChocolate.Validator, HotChocolate, GraphQL</PackageTags>
<PackageIcon>icon.png</PackageIcon>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Version>2.1.1</Version>
<Version>$(Version)</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HotChocolate.Execution" Version="13.2.1" />
<PackageReference Include="HotChocolate.Execution" Version="13.7.0" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion src/ValidationMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ public async Task InvokeAsync(IMiddlewareContext context)
context.ReportError(ErrorBuilder.New()
.SetMessage(validationResult.ErrorMessage)
.SetExtension("field", char.ToLowerInvariant(field[0]) + field.Substring(1))
.SetPath(PathFactory.Instance.New(argument.Name))
.SetPath(new List<string>
{
argument.Name
})
.Build());
}

Expand Down
14 changes: 7 additions & 7 deletions test/Graph.ArgumentValidator.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Snapshooter.Xunit" Version="0.7.1" />
<PackageReference Include="Snapshooter.Xunit" Version="0.13.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.2">
<PackageReference Include="coverlet.collector" Version="6.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 0f643ec

Please sign in to comment.