Skip to content

Commit

Permalink
Обновление пакетов (#31)
Browse files Browse the repository at this point in the history
* bump

* Смигрировал DefaultHttpResultSerializer на DefaultHttpResponseFormatter

* new version

* fix dev package

* *
  • Loading branch information
gkurbesov authored Oct 24, 2023
1 parent 4419457 commit 7eca2c5
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 83 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ name: Publish dev
on:
push:
branches:
- publish-dev
- publish-dev/**

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
- name: Setup .NET Core 6.0
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x
- name: Install dependencies
Expand Down
3 changes: 2 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup>
<VersionMajor>7</VersionMajor>
<VersionMajor>8</VersionMajor>
<VersionMinor>0</VersionMinor>
<BuildNumber>$(BuildNumber)</BuildNumber>
<BuildNumber Condition="'$(BuildNumber)' == ''">0</BuildNumber>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>Mindbox.ExceptionsHandling</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ public static class ConfigurationExtensions
public static IServiceCollection AddGraphQLErrorHandling(this IServiceCollection services) =>
services
.AddErrorFilter<GraphQLHandleErrorFilter>()
.AddHttpResultSerializer<GraphQLHttpAgnosticResultSerializer>();
.AddHttpResponseFormatter<GraphQLHttpAgnosticResultFormatter>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@

namespace Mindbox.ExceptionsHandling.GraphQL;

public class GraphQLHttpAgnosticResultSerializer : DefaultHttpResultSerializer
public class GraphQLHttpAgnosticResultFormatter : DefaultHttpResponseFormatter
{
public override HttpStatusCode GetStatusCode(IExecutionResult result)
protected override HttpStatusCode OnDetermineStatusCode(
IQueryResult result,
FormatInfo format,
HttpStatusCode? proposedStatusCode)
{
return result switch
{
// This is required for our frontend
QueryResult => HttpStatusCode.OK,
DeferredQueryResult => HttpStatusCode.OK,
BatchQueryResult => HttpStatusCode.OK,
_ => HttpStatusCode.InternalServerError
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="HotChocolate.AspNetCore" Version="12.6.0" />
<PackageReference Include="HotChocolate.Execution" Version="12.6.0" />
<PackageReference Include="HotChocolate.AspNetCore" Version="13.5.1" />
<PackageReference Include="HotChocolate.Execution" Version="13.5.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Mindbox.ExceptionsHandling.Abstractions\Mindbox.ExceptionsHandling.Abstractions.csproj" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<TargetFrameworks>net6.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
<PackageReference Include="coverlet.collector" Version="1.3.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Mindbox.ExceptionsHandling.GraphQL\Mindbox.ExceptionsHandling.GraphQL.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Mindbox.ExceptionsHandling.Abstractions\Mindbox.ExceptionsHandling.Abstractions.csproj" />
Expand Down

0 comments on commit 7eca2c5

Please sign in to comment.