GraphQl dataStructure refactored

This commit is contained in:
Michael Shabanov committed 2020-02-23 23:27:12 +03:00
1 parent 95443d2996
commit 6c2104f6d7
8 files changed
+35 -154

No files matched your search

@@ -0,0 +1,6 @@
namespace WotBlitzStatistics.GraphQl.ObjectTypes
{
public class PlayerAcchievementsInfoObjectType
{
}
}
@@ -1,17 +1,16 @@
using HotChocolate.Types;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using WotBlitzStatisticsPro.Common.Model;
using WotBlitzStatisticsPro.WgApiClient.Model;
namespace WotBlitzStatistics.GraphQl.ObjectTypes
{
public class PlayerAccountInfoObjectType: ObjectType<PlayerAccountInfo>
public class PlayerAccountInfoObjectType: ObjectType<AccountInfo>
{
protected override void Configure(IObjectTypeDescriptor<PlayerAccountInfo> descriptor)
protected override void Configure(IObjectTypeDescriptor<AccountInfo> descriptor)
{
base.Configure(descriptor);
descriptor.Field(a => a.Private).Ignore();
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
}
@@ -0,0 +1,6 @@
namespace WotBlitzStatistics.GraphQl.ObjectTypes
{
public class PlayerClanInfoObjectType
{
}
}
@@ -0,0 +1,6 @@
namespace WotBlitzStatistics.GraphQl.ObjectTypes
{
public class PlayerTankInfoObjectType
{
}
}