Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implements many serializers for AttachmentActionResult relates and so on #343

Merged
merged 11 commits into from
Sep 27, 2024
5 changes: 4 additions & 1 deletion Lib9c.GraphQL/Lib9c.GraphQL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GraphQL" Version="7.8.0" />
<PackageReference Include="HotChocolate.AspNetCore" Version="13.9.12" />
<PackageReference Include="HotChocolate.Types.Analyzers" Version="13.9.12">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -18,5 +17,9 @@
<PackageReference Include="Lib9c" Version="1.17.2-dev.95968dfc2482cdaf21ad5fc71cf40b5f191b6d39" />
<PackageReference Include="Libplanet" Version="5.2.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Lib9c.Models\Lib9c.Models.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using HotChocolate.Types;
using Lib9c.GraphQL.Types.Items;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class AttachmentActionResultInterfaceType : InterfaceType<AttachmentActionResult>
{
protected override void Configure(IInterfaceTypeDescriptor<AttachmentActionResult> descriptor)
{
descriptor.Name("AttachmentActionResultInterface");
descriptor
.Field(f => f.ItemUsable)
.Type<ItemUsableInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class AttachmentActionResultType : ObjectType<AttachmentActionResult>
{
protected override void Configure(IObjectTypeDescriptor<AttachmentActionResult> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/AttachmentActionResults/Buy7BuyerResultType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class Buy7BuyerResultType : ObjectType<Buy7BuyerResult>
{
protected override void Configure(IObjectTypeDescriptor<Buy7BuyerResult> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class Buy7SellerResultType : ObjectType<Buy7SellerResult>
{
protected override void Configure(IObjectTypeDescriptor<Buy7SellerResult> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class CombinationConsumable5ResultType : ObjectType<CombinationConsumable5Result>
{
protected override void Configure(IObjectTypeDescriptor<CombinationConsumable5Result> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class DailyReward2ResultType : ObjectType<DailyReward2Result>
{
protected override void Configure(IObjectTypeDescriptor<DailyReward2Result> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class ItemEnhancement11ResultType : ObjectType<ItemEnhancement11Result>
{
protected override void Configure(IObjectTypeDescriptor<ItemEnhancement11Result> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class ItemEnhancement12ResultType : ObjectType<ItemEnhancement12Result>
{
protected override void Configure(IObjectTypeDescriptor<ItemEnhancement12Result> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class ItemEnhancement13ResultType : ObjectType<ItemEnhancement13Result>
{
protected override void Configure(IObjectTypeDescriptor<ItemEnhancement13Result> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class ItemEnhancement7ResultType : ObjectType<ItemEnhancement7Result>
{
protected override void Configure(IObjectTypeDescriptor<ItemEnhancement7Result> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class ItemEnhancement9ResultType : ObjectType<ItemEnhancement9Result>
{
protected override void Configure(IObjectTypeDescriptor<ItemEnhancement9Result> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class MonsterCollectionResultType : ObjectType<MonsterCollectionResult>
{
protected override void Configure(IObjectTypeDescriptor<MonsterCollectionResult> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class RapidCombination0ResultType : ObjectType<RapidCombination0Result>
{
protected override void Configure(IObjectTypeDescriptor<RapidCombination0Result> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class RapidCombination5ResultType : ObjectType<RapidCombination5Result>
{
protected override void Configure(IObjectTypeDescriptor<RapidCombination5Result> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.AttachmentActionResults;

namespace Lib9c.GraphQL.Types.AttachmentActionResults;

public class SellCancellationResultType : ObjectType<SellCancellationResult>
{
protected override void Configure(IObjectTypeDescriptor<SellCancellationResult> descriptor)
{
descriptor.Implements<AttachmentActionResultInterfaceType>();
}
}
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/Items/ArmorType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class ArmorType : ObjectType<Armor>
{
protected override void Configure(IObjectTypeDescriptor<Armor> descriptor)
{
descriptor.Implements<EquipmentInterfaceType>();
}
}
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/Items/AuraType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class AuraType : ObjectType<Aura>
{
protected override void Configure(IObjectTypeDescriptor<Aura> descriptor)
{
descriptor.Implements<EquipmentInterfaceType>();
}
}
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/Items/BeltType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class BeltType : ObjectType<Belt>
{
protected override void Configure(IObjectTypeDescriptor<Belt> descriptor)
{
descriptor.Implements<EquipmentInterfaceType>();
}
}
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/Items/ConsumableType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class ConsumableType : ObjectType<Consumable>
{
protected override void Configure(IObjectTypeDescriptor<Consumable> descriptor)
{
descriptor.Implements<ItemUsableInterfaceType>();
}
}
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/Items/CostumeType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class CostumeType : ObjectType<Costume>
{
protected override void Configure(IObjectTypeDescriptor<Costume> descriptor)
{
descriptor.Implements<ItemBaseInterfaceType>();
}
}
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/Items/EquipmentInterfaceType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class EquipmentInterfaceType : InterfaceType<Equipment>
{
protected override void Configure(IInterfaceTypeDescriptor<Equipment> descriptor)
{
descriptor.Name("EquipmentInterface");
}
}
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/Items/EquipmentType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class EquipmentType : ObjectType<Equipment>
{
protected override void Configure(IObjectTypeDescriptor<Equipment> descriptor)
{
descriptor.Implements<ItemUsableInterfaceType>();
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using HotChocolate.Types;
using Nekoyume.Model.Item;

namespace Lib9c.GraphQL.Types;
namespace Lib9c.GraphQL.Types.Items;

public class FungibleItemType : InterfaceType<IFungibleItem>
{
Expand Down
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/Items/GrimoireType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class GrimoireType : ObjectType<Grimoire>
{
protected override void Configure(IObjectTypeDescriptor<Grimoire> descriptor)
{
descriptor.Implements<EquipmentInterfaceType>();
}
}
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/Items/ItemBaseInterfaceType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class ItemBaseInterfaceType : InterfaceType<ItemBase>
{
protected override void Configure(IInterfaceTypeDescriptor<ItemBase> descriptor)
{
descriptor.Name("ItemBaseInterface");
}
}
8 changes: 8 additions & 0 deletions Lib9c.GraphQL/Types/Items/ItemBaseType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class ItemBaseType : ObjectType<ItemBase>
{
}
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/Items/ItemUsableInterfaceType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class ItemUsableInterfaceType : InterfaceType<ItemUsable>
{
protected override void Configure(IInterfaceTypeDescriptor<ItemUsable> descriptor)
{
descriptor.Name("ItemUsableInterface");
}
}
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/Items/ItemUsableType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class ItemUsableType : ObjectType<ItemUsable>
{
protected override void Configure(IObjectTypeDescriptor<ItemUsable> descriptor)
{
descriptor.Implements<ItemBaseInterfaceType>();
}
}
12 changes: 12 additions & 0 deletions Lib9c.GraphQL/Types/Items/MaterialInterfaceType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using HotChocolate.Types;
using Lib9c.Models.Items;

namespace Lib9c.GraphQL.Types.Items;

public class MaterialInterfaceType : InterfaceType<Material>
{
protected override void Configure(IInterfaceTypeDescriptor<Material> descriptor)
{
descriptor.Name("MaterialInterface");
}
}
Loading
Loading