mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-12-05 07:42:34 +01:00
20 lines
647 B
C#
20 lines
647 B
C#
using System.Threading;
|
|||
|
|
using System.Threading.Tasks;
|
||
|
|
using HotChocolate;
|
||
|
|
using WotBlitzStatistics.GraphQl.DataLoaders;
|
||
|
|
using WotBlitzStatisticsPro.WgApiClient;
|
||
|
|
using WotBlitzStatisticsPro.WgApiClient.Model;
|
||
|
|
|
||
|
|
namespace WotBlitzStatistics.GraphQl.Resolvers
|
||
|
|
{
|
||
|
|
[GraphQLResolverOf(typeof(ClanInfo))]
|
||
|
|
public class ClanInfoResolver
|
||
|
|
{
|
||
|
|
public async Task<ClanInfo> GetClanInfo(
|
||
|
|
[Parent] ClanAccountInfo clanAccountInfo,
|
||
|
|
[DataLoader] ClanDataLoader clanDataLoader)
|
||
|
|
{
|
||
|
|
return (await clanDataLoader.LoadAsync(new[] {clanAccountInfo.ClanId.Value}, CancellationToken.None))[0];
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|