Skip to content

Commit e58c93d

Browse files
committed
.net 6
1 parent d3a7041 commit e58c93d

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

code/complete/GraphQL.Tests/GraphQL.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

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

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

code/complete/GraphQL/GraphQL.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<RootNamespace>ConferencePlanner.GraphQL</RootNamespace>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
@@ -12,9 +12,9 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="HotChocolate.AspNetCore" Version="12.0.0-preview.30" />
16-
<PackageReference Include="HotChocolate.Data" Version="12.0.0-preview.30" />
17-
<PackageReference Include="HotChocolate.PersistedQueries.FileSystem" Version="12.0.0-preview.30" />
15+
<PackageReference Include="HotChocolate.AspNetCore" Version="12.0.0-preview.33" />
16+
<PackageReference Include="HotChocolate.Data" Version="12.0.0-preview.33" />
17+
<PackageReference Include="HotChocolate.PersistedQueries.FileSystem" Version="12.0.0-preview.33" />
1818
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0" />
1919
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0">
2020
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

code/complete/GraphQL/Startup.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using HotChocolate;
1616
using HotChocolate.Types;
1717
using HotChocolate.Resolvers;
18+
using System.Diagnostics;
1819

1920
namespace ConferencePlanner.GraphQL
2021
{
@@ -40,10 +41,7 @@ public void ConfigureServices(IServiceCollection services)
4041
.AddGraphQLServer()
4142

4243
// Next we add the types to our schema.
43-
.AddQueryType(d => d
44-
.Name(OperationTypeNames.Query)
45-
.Field("version")
46-
.Resolve(typeof(IResolverContext).Assembly.GetName().Version?.ToString()))
44+
.AddQueryType()
4745
.AddTypeExtension<AttendeeQueries>()
4846
.AddTypeExtension<SessionQueries>()
4947
.AddTypeExtension<SpeakerQueries>()

code/complete/GraphQL/dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
2-
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env
2+
FROM mcr.microsoft.com/dotnet/6.0.100-preview.7-alpine3.13-amd64 AS build-env
33
WORKDIR /app
44

55
# Copy csproj and restore as distinct layers
@@ -8,7 +8,7 @@ RUN dotnet restore
88
RUN dotnet publish -c Release -o out
99

1010
# Build runtime image
11-
FROM mcr.microsoft.com/dotnet/aspnet:5.0
11+
FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-preview.7-alpine3.13-amd64
1212
WORKDIR /app
1313
COPY --from=build-env /app/out .
1414
ENTRYPOINT ["dotnet", "GraphQL.dll"]

code/complete/global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "6.0.100-preview.7.21379.14"
4+
}
5+
}

0 commit comments

Comments
 (0)