Skip to content

Commit c4bbf52

Browse files
authored
HotChocolate 14, added support for dotnet8, dropped support for dotnet6 (#46)
* Upgraded to HotChocolate 14 * Dropped dotnet 6 * Added dotnet 8
1 parent c96eb05 commit c4bbf52

60 files changed

Lines changed: 408 additions & 453 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,4 +337,5 @@ ASALocalRun/
337337
testoutput/
338338

339339
tools/**
340-
!tools/packages.config
340+
!tools/packages.config
341+
**/__mismatch__/*.snap

Directory.Build.props

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<Project>
22

3-
<Import Project="$([MSBuild]::GetPathOfFileAbove('Versions.props', '$(MSBuildThisFileDirectory)'))"/>
4-
53
<PropertyGroup>
6-
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
7-
<LangVersion>preview</LangVersion>
4+
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
5+
<LangVersion>latest</LangVersion>
86
<Nullable>enable</Nullable>
97
</PropertyGroup>
108

Directory.Packages.props

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="[1.1,)" />
9+
10+
<PackageVersion Include="HotChocolate" Version="14.0.0-rc.3" />
11+
<PackageVersion Include="HotChocolate.AspNetCore" Version="14.0.0-rc.3" />
12+
<PackageVersion Include="HotChocolate.AspNetCore.Authorization" Version="14.0.0-rc.3" />
13+
<PackageVersion Include="HotChocolate.Data" Version="14.0.0-rc.3" />
14+
<PackageVersion Include="HotChocolate.Execution" Version="14.0.0-rc.3" />
15+
<PackageVersion Include="HotChocolate.Types" Version="14.0.0-rc.3" />
16+
<PackageVersion Include="HotChocolate.Types.Analyzers" Version="14.0.0-rc.3" />
17+
18+
<PackageVersion Include="MassTransit.Azure.ServiceBus.Core" Version="[8.0.0,)" />
19+
<PackageVersion Include="Microsoft.AspNetCore.Http.Abstractions" Version="[2.2.0,)" />
20+
21+
<PackageVersion Include="System.Threading.Channels" Version="[4.7.1,)" />
22+
</ItemGroup>
23+
24+
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
25+
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="[7,)" />
26+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="[7,)" />
27+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[7,)" />
28+
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="[7,)" />
29+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="[7,)" />
30+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="[7,)" />
31+
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="[7,)" />
32+
<PackageVersion Include="Microsoft.Extensions.Localization" Version="[7,)" />
33+
</ItemGroup>
34+
35+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
36+
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="[8,)" />
37+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="[8,)" />
38+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[8,)" />
39+
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="[8,)" />
40+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="[8,)" />
41+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="[8,)" />
42+
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="[8,)" />
43+
<PackageVersion Include="Microsoft.Extensions.Localization" Version="[8,)" />
44+
</ItemGroup>
45+
46+
<ItemGroup>
47+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
48+
<PackageVersion Include="xunit" Version="2.9.2" />
49+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2">
50+
<PrivateAssets>all</PrivateAssets>
51+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
52+
</PackageVersion>
53+
<PackageVersion Include="FluentAssertions" Version="6.12.1" />
54+
<PackageVersion Include="Moq" Version="4.13.0" />
55+
<PackageVersion Include="Snapshooter.Xunit" Version="0.14.1" />
56+
<PackageVersion Include="Squadron.Mongo" Version="0.17.0" />
57+
<PackageVersion Include="coverlet.msbuild" Version="3.1.2" />
58+
</ItemGroup>
59+
60+
</Project>

Versions.props

Lines changed: 0 additions & 16 deletions
This file was deleted.

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "7.0.101"
3+
"version": "8.0.402"
44
}
55
}

samples/StarWars/Characters/Droid.cs renamed to samples/StarWars.Models/Characters/Droid.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
using System.Collections.Generic;
2-
using HotChocolate.Extensions.Translation;
3-
using HotChocolate.Types;
4-
using HotChocolate.Types.Relay;
52

63
namespace StarWars.Characters
74
{
@@ -36,7 +33,6 @@ public Droid(
3633
public IReadOnlyList<int> Friends { get; }
3734

3835
/// <inheritdoc />
39-
[TranslateArray<Episode>("Episodes")]
4036
public IReadOnlyList<Episode> AppearsIn { get; }
4137

4238
/// <summary>
@@ -45,7 +41,6 @@ public Droid(
4541
public string PrimaryFunction { get; }
4642

4743
/// <inheritdoc />
48-
[UseConvertUnit]
4944
public double Height { get; }
5045
}
5146
}
File renamed without changes.
File renamed without changes.

samples/StarWars/Characters/Human.cs renamed to samples/StarWars.Models/Characters/Human.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System;
22
using System.Collections.Generic;
3-
using HotChocolate.Extensions.Translation;
43

54
namespace StarWars.Characters
65
{
@@ -39,7 +38,6 @@ public Human(
3938
public IReadOnlyList<int> Friends { get; }
4039

4140
/// <inheritdoc />
42-
[TranslateArray<Episode>("Episodes")]
4341
public IReadOnlyList<Episode> AppearsIn { get; }
4442

4543
/// <summary>
@@ -55,11 +53,9 @@ public Human(
5553
/// <summary>
5654
/// the Humans's marital status
5755
/// </summary>
58-
[Translate<MaritalStatus>(resourceKeyPrefix: "MaritalStatus")]
5956
public MaritalStatus MaritalStatus { get; }
6057

6158
/// <inheritdoc />
62-
[UseConvertUnit]
6359
[Obsolete(message: "invocations of this field will be tracked!")]
6460
public double Height { get; }
6561
}
Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
using System.Collections.Generic;
2-
using HotChocolate.Extensions.Translation;
3-
using HotChocolate.Types;
42

53
namespace StarWars.Characters
64
{
75
/// <summary>
86
/// A character in the Star Wars universe.
97
/// </summary>
10-
[InterfaceType("Character")]
118
public interface ICharacter : ISearchResult
129
{
1310
/// <summary>
@@ -20,22 +17,9 @@ public interface ICharacter : ISearchResult
2017
/// </summary>
2118
string Name { get; }
2219

23-
/// <summary>
24-
/// The ids of the character's friends.
25-
/// </summary>
26-
[UsePaging(typeof(InterfaceType<ICharacter>))]
27-
IReadOnlyList<int> Friends { get; }
28-
29-
/// <summary>
30-
/// The episodes the character appears in.
31-
/// </summary>
32-
[TranslateArray<Episode>("Episodes")]
33-
IReadOnlyList<Episode> AppearsIn { get; }
34-
3520
/// <summary>
3621
/// The height of the character.
3722
/// </summary>
38-
[UseConvertUnit]
3923
double Height { get; }
4024
}
4125
}

0 commit comments

Comments
 (0)