mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 19:30:06 +02:00
ClanInfo added
This commit is contained in:
1 parent
6c2104f6d7
commit
1d13507aa7
6 files changed
+74
-4
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using HotChocolate.Types;
|
||||
using System.Collections.Generic;
|
||||
using WotBlitzStatisticsPro.WgApiClient;
|
||||
using WotBlitzStatisticsPro.WgApiClient.Model;
|
||||
|
||||
namespace WotBlitzStatistics.GraphQl.ObjectTypes
|
||||
@@ -9,7 +10,13 @@ namespace WotBlitzStatistics.GraphQl.ObjectTypes
|
||||
protected override void Configure(IObjectTypeDescriptor<AccountInfo> descriptor)
|
||||
{
|
||||
descriptor.Field(a => a.Private).Ignore();
|
||||
descriptor.Field("Tanks").Type<NonNullType<ListType<StringType>>>()
|
||||
descriptor.Field("clanInfo")
|
||||
//.Argument("accountId", a => a.Type<NonNullType<LongType>>())
|
||||
//.Type<ClanAccountInfo>()
|
||||
.Resolver(c => c.Service<IWargamingApiClient>()
|
||||
.GetPlayerClanInfo(c.Parent<AccountInfo>().AccountId.Value));
|
||||
|
||||
descriptor.Field("tanks").Type<NonNullType<ListType<StringType>>>()
|
||||
.Resolver(c => new List<string> { "Fuck yeah" });
|
||||
// Add resolver for Clan, Tanks, Achievements
|
||||
// https://hotchocolate.io/docs/schema-object-type
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
namespace WotBlitzStatistics.GraphQl.ObjectTypes
|
||||
using HotChocolate.Types;
|
||||
using WotBlitzStatisticsPro.WgApiClient.Model;
|
||||
|
||||
namespace WotBlitzStatistics.GraphQl.ObjectTypes
|
||||
{
|
||||
public class PlayerClanInfoObjectType
|
||||
public class PlayerClanInfoObjectType : ObjectType<ClanAccountInfo>
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,7 @@ namespace WotBlitzStatistics.GraphQl
|
||||
.AddType<PlayerAccountInfoObjectType>()
|
||||
.AddType<AccountStatistics>()
|
||||
.AddType<AccountFullStatistics>()
|
||||
.AddType<PlayerClanInfoObjectType>()
|
||||
//.AddEnumType<MarkOfMastery>()
|
||||
.Create());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user