mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-27 04:10:07 +01:00
Some Data loader stuff
This commit is contained in:
1 parent
d643c323b3
commit
83628d21bd
5 files changed
+61
-14
No files matched your search
@@ -1,6 +1,7 @@
|
||||
using HotChocolate;
|
||||
using HotChocolate.AspNetCore;
|
||||
using HotChocolate.AspNetCore.Voyager;
|
||||
using HotChocolate.DataLoader;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
@@ -30,8 +31,10 @@ namespace WotBlitzStatistics.GraphQl
|
||||
services.AddSingleton<IWargamingApiSettings>(wgApiConfig);
|
||||
services.AddHttpClient<IWargamingApiClient, WargamingApiClient>();
|
||||
|
||||
// this enables you to use DataLoader in your resolvers.
|
||||
services.AddDataLoaderRegistry();
|
||||
// Global data loader - caches data between requests
|
||||
//services.AddSingleton<IDataLoaderRegistry, DataLoaderRegistry>();
|
||||
// this enables you to use DataLoader in your resolvers.
|
||||
services.AddDataLoaderRegistry();
|
||||
|
||||
// Add GraphQL Services
|
||||
services.AddGraphQL(sp => SchemaBuilder.New()
|
||||
|
||||
Reference in new issue
Block a user