mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 19:30:06 +02:00
Dotnet 5.0 migration
This commit is contained in:
1 parent
758aa10e55
commit
e5c90e03d3
8 files changed
+35
-53
No files matched your search
@@ -12,7 +12,7 @@
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "graphql/playground",
|
||||
"launchUrl": "graphql",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
"WotBlitzStatistics.GraphQl": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "graphql/playground",
|
||||
"launchUrl": "graphql",
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
using HotChocolate;
|
||||
using HotChocolate.AspNetCore;
|
||||
using HotChocolate.AspNetCore.Voyager;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
@@ -36,39 +33,27 @@ namespace WotBlitzStatisticsPro.GraphQl
|
||||
services.AddSingleton<IMongoSettings>(mongoConfig);
|
||||
WotBlitzStatisticsLogicInstaller.ConfigureServices(services);
|
||||
|
||||
// Global data loader - caches data between requests
|
||||
// ToDo: cause nullreference exception
|
||||
//services.AddSingleton<IDataLoaderRegistry, DataLoaderRegistry>();
|
||||
|
||||
// this enables you to use DataLoader in your resolvers.
|
||||
services.AddDataLoaderRegistry();
|
||||
|
||||
// Add GraphQL Services
|
||||
services.AddGraphQL(sp => SchemaBuilder.New()
|
||||
.AddServices(sp)
|
||||
|
||||
// Adds the authorize directive and
|
||||
// enable the authorization middleware.
|
||||
.AddAuthorizeDirectiveType()
|
||||
|
||||
.AddQueryType<WotBlitzStatisticsQuery>()
|
||||
services.AddGraphQLServer()
|
||||
.AddQueryType<WotBlitzStatisticsQuery>()
|
||||
.AddMutationType<WotBlitzStatisticsMutation>()
|
||||
//.AddSubscriptionType<SubscriptionType>()
|
||||
.AddType<AccountsSearchItemObjectType>()
|
||||
.AddType<AccountsSearchObjectType>()
|
||||
.AddEnumType<MarkOfMastery>()
|
||||
.AddEnumType<RealmType>()
|
||||
.AddEnumType<RequestLanguage>()
|
||||
.Create());
|
||||
.AddType<AccountsSearchItemObjectType>()
|
||||
.AddType<AccountsSearchObjectType>()
|
||||
.AddEnumType<MarkOfMastery>()
|
||||
.AddEnumType<RealmType>()
|
||||
.AddEnumType<RequestLanguage>();
|
||||
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
app
|
||||
.UseGraphQL("/graphql")
|
||||
.UsePlayground("/graphql")
|
||||
.UseVoyager("/graphql")
|
||||
;
|
||||
.UseRouting()
|
||||
.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapGraphQL();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HotChocolate.AspNetCore" Version="10.3.6" />
|
||||
<PackageReference Include="HotChocolate.AspNetCore.Abstractions" Version="10.3.6" />
|
||||
<PackageReference Include="HotChocolate.AspNetCore.Authorization" Version="10.3.6" />
|
||||
<PackageReference Include="HotChocolate.AspNetCore.Playground" Version="10.3.6" />
|
||||
<PackageReference Include="HotChocolate.AspNetCore.Voyager" Version="10.3.6" />
|
||||
<PackageReference Include="HotChocolate.Types.Filters" Version="10.3.6" />
|
||||
<PackageReference Include="HotChocolate.AspNetCore" Version="11.0.6" />
|
||||
<PackageReference Include="HotChocolate.AspNetCore.Authorization" Version="11.0.6" />
|
||||
<PackageReference Include="HotChocolate.Types.Filters" Version="11.0.6" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in new issue
Block a user