Files

20 lines
788 B
C#
Raw Permalink Normal View History

2021-03-19 19:49:58 +01:00
using HotChocolate.Types;
using WotBlitzStatisticsPro.Common.Model;
2021-06-04 14:13:16 +02:00
using WotBlitzStatisticsPro.GraphQl.ObjectTypes;
2021-03-19 19:49:58 +01:00
using WotBlitzStatisticsPro.Logic;
namespace WotBlitzStatisticsPro.GraphQl.Resolvers
{
[ExtendObjectType(Name = "Query")]
public class AccountInfoResolver: ObjectType<AccountInfoResponse>
{
protected override void Configure(IObjectTypeDescriptor<AccountInfoResponse> descriptor)
{
2021-06-04 14:13:16 +02:00
descriptor.Name("AccountInfoResponse");
descriptor.Implements<StatisticsResponseType>();
2021-03-19 19:49:58 +01:00
descriptor.Field(t => t.ClanInfo)
.Resolver(ctx => ctx.Service<IWargamingClans>().GelClanInfoByAccount(ctx.Parent<AccountInfoResponse>().AccountId, ctx.Parent<AccountInfoResponse>().RegionAndLanguage));
2021-03-19 19:49:58 +01:00
}
}
}