mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 11:20:05 +02:00
feat: Clan Resolver first step
This commit is contained in:
1 parent
7f713e5357
commit
8fb1b170df
11 files changed
+203
-2
No files matched your search
@@ -0,0 +1,18 @@
|
||||
using HotChocolate.Types;
|
||||
using WotBlitzStatisticsPro.Common.Model;
|
||||
using WotBlitzStatisticsPro.GraphQl.Helpers;
|
||||
using WotBlitzStatisticsPro.Logic;
|
||||
|
||||
namespace WotBlitzStatisticsPro.GraphQl.Resolvers
|
||||
{
|
||||
[ExtendObjectType(Name = "Query")]
|
||||
public class AccountInfoResolver: ObjectType<AccountInfoResponse>
|
||||
{
|
||||
protected override void Configure(IObjectTypeDescriptor<AccountInfoResponse> descriptor)
|
||||
{
|
||||
descriptor.Field(t => t.ClanInfo)
|
||||
.Resolver(ctx => ctx.Service<IWargamingClans>().GelClanInfoByAccount(ctx.Parent<AccountInfoResponse>().AccountId, ctx.Operation.ParseOperation()));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user