Skip to content

Commit aaf0680

Browse files
Smells
1 parent e2fdb19 commit aaf0680

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

src/Dotnet6.GraphQL4.Store.WebAPI/Graphs/Extensions/DependencyInjection/ApplicationBuilderExtensions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ public static IApplicationBuilder UseApplicationGraphQL<TSchema>(this IApplicati
1313
.UseGraphQLWebSockets<TSchema>()
1414
.UseGraphQL<TSchema>()
1515
.UseGraphQLPlayground(
16-
new()
16+
options: new()
1717
{
1818
BetaUpdates = true,
1919
RequestCredentials = RequestCredentials.Omit,
2020
HideTracingResponse = false,
21-
2221
EditorCursorShape = EditorCursorShape.Line,
2322
EditorTheme = EditorTheme.Dark,
2423
EditorFontSize = 14,
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Threading.Tasks;
12
using Microsoft.AspNetCore.Hosting;
23
using Microsoft.Extensions.Hosting;
34

@@ -7,10 +8,15 @@ public static class Program
78
{
89
private static IHostBuilder CreateHostBuilder(string[] args)
910
=> Host.CreateDefaultBuilder(args)
10-
.ConfigureWebHostDefaults(webBuilder
11-
=> webBuilder.UseStartup<Startup>());
11+
.ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup<Startup>())
12+
.UseDefaultServiceProvider(
13+
(context, options) =>
14+
{
15+
options.ValidateScopes = context.HostingEnvironment.IsDevelopment();
16+
options.ValidateOnBuild = true;
17+
});
1218

13-
public static void Main(string[] args)
14-
=> CreateHostBuilder(args).Build().Run();
19+
public static Task Main(string[] args)
20+
=> CreateHostBuilder(args).Build().RunAsync();
1521
}
1622
}

0 commit comments

Comments
 (0)