File tree Expand file tree Collapse file tree
Dotnet6.GraphQL4.Store.WebAPI/Graphs/Extensions/DependencyInjection
Dotnet6.GraphQL4.Store.WebMVC Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ,
Original file line number Diff line number Diff line change 1+ using System . Threading . Tasks ;
12using Microsoft . AspNetCore . Hosting ;
23using 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}
You can’t perform that action at this time.
0 commit comments