-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from planetarium/feat/implement-avatar-query
feat: introduce "avatar" query
- Loading branch information
Showing
22 changed files
with
320 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Lib9c.GraphQL.Enums; | ||
|
||
public enum PlanetName | ||
{ | ||
Odin, | ||
Heimdall, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using HotChocolate.Types; | ||
using Nekoyume.Model.Item; | ||
|
||
namespace Lib9c.GraphQL.Types; | ||
|
||
public class FungibleItemType : InterfaceType<IFungibleItem> | ||
{ | ||
protected override void Configure(IInterfaceTypeDescriptor<IFungibleItem> descriptor) | ||
{ | ||
descriptor | ||
.Field(t => t.FungibleId) | ||
.Description("The fungible ID of the item.") | ||
.Type<NonNullType<HashDigestSHA256Type>>(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,19 @@ | ||
using HotChocolate.Types; | ||
using Lib9c.GraphQL.Objects; | ||
using Nekoyume.Model.Item; | ||
|
||
namespace Lib9c.GraphQL.Types; | ||
|
||
public class ItemType : ObjectType<ItemObject> | ||
public class ItemType : InterfaceType<IItem> | ||
{ | ||
protected override void Configure(IObjectTypeDescriptor<ItemObject> descriptor) | ||
protected override void Configure(IInterfaceTypeDescriptor<IItem> descriptor) | ||
{ | ||
descriptor | ||
.Field(f => f.ItemSheetId) | ||
.Name("itemSheetId") | ||
.Description("The ItemSheet ID of the item.") | ||
.Type<NonNullType<IntType>>(); | ||
descriptor | ||
.Field(f => f.Grade) | ||
.Name("grade") | ||
.Description("The grade of the item.") | ||
.Type<NonNullType<IntType>>(); | ||
descriptor | ||
.Field(f => f.ItemType) | ||
.Name("itemType") | ||
.Description("The ItemType of the item.") | ||
.Type<NonNullType<ItemTypeEnumType>>(); | ||
descriptor | ||
.Field(f => f.ItemSubType) | ||
.Name("itemSubType") | ||
.Description("The ItemSubType of the item.") | ||
.Type<NonNullType<ItemSubTypeEnumType>>(); | ||
descriptor | ||
.Field(f => f.ElementalType) | ||
.Name("elementalType") | ||
.Description("The ElementalType of the item.") | ||
.Type<NonNullType<ElementalTypeEnumType>>(); | ||
descriptor | ||
.Field(f => f.Count) | ||
.Name("count") | ||
.Description("The count of the item.") | ||
.Type<NonNullType<IntType>>(); | ||
descriptor | ||
.Field(f => f.Level) | ||
.Name("level") | ||
.Description("The level of the item.") | ||
.Type<IntType>(); | ||
descriptor | ||
.Field(f => f.RequiredBlockIndex) | ||
.Name("requiredBlockIndex") | ||
.Description("The required block index of the item.") | ||
.Type<IntType>(); | ||
descriptor | ||
.Field(f => f.FungibleId) | ||
.Name("fungibleId") | ||
.Description("The Fungible ID of the item.") | ||
.Type<HashDigestSHA256Type>(); | ||
descriptor | ||
.Field(f => f.NonFungibleId) | ||
.Name("nonFungibleId") | ||
.Description("The Non-Fungible ID of the item.") | ||
.Type<GuidType>(); | ||
descriptor | ||
.Field(f => f.TradableId) | ||
.Name("tradableId") | ||
.Description("The Tradable ID of the item.") | ||
.Type<GuidType>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using HotChocolate.Types; | ||
using Nekoyume.Model.Item; | ||
|
||
namespace Lib9c.GraphQL.Types; | ||
|
||
public class NonFungibleItemType : InterfaceType<INonFungibleItem> | ||
{ | ||
protected override void Configure(IInterfaceTypeDescriptor<INonFungibleItem> descriptor) | ||
{ | ||
descriptor | ||
.Field(f => f.NonFungibleId) | ||
.Description("The non-fungible ID of the item.") | ||
.Type<NonNullType<GuidType>>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,8 @@ | ||
using HotChocolate.Types; | ||
using Lib9c.GraphQL.Enums; | ||
|
||
namespace Lib9c.GraphQL.Types; | ||
|
||
public class PlanetNameEnumType : EnumType<string> | ||
public class PlanetNameEnumType : EnumType<PlanetName> | ||
{ | ||
protected override void Configure(IEnumTypeDescriptor<string> descriptor) | ||
{ | ||
descriptor | ||
.Name("PlanetName") | ||
.Description("The name of the planet.\n" + | ||
"See https://planets.nine-chronicles.com/planets/ or" + | ||
" https://planets-internal.nine-chronicles.com/planets/ for more information.") | ||
.BindValuesExplicitly(); | ||
descriptor | ||
.Value("odin") | ||
.Name("ODIN") | ||
.Description("The name of the planet odin."); | ||
descriptor | ||
.Value("heimdall") | ||
.Name("HEIMDALL") | ||
.Description("The name of the planet heimdall."); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using HotChocolate.Types; | ||
using Nekoyume.Model.Item; | ||
|
||
namespace Lib9c.GraphQL.Types; | ||
|
||
public class TradableItemType : InterfaceType<ITradableItem> | ||
{ | ||
protected override void Configure(IInterfaceTypeDescriptor<ITradableItem> descriptor) | ||
{ | ||
descriptor.Field(t => t.TradableId) | ||
.Type<NonNullType<UuidType>>(); | ||
|
||
descriptor.Field(t => t.RequiredBlockIndex) | ||
.Type<NonNullType<LongType>>(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace Mimir.GraphQL.Objects; | ||
|
||
public class AvatarObject | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace Mimir.GraphQL.Objects; | ||
|
||
public class InventoryObject | ||
{ | ||
} |
3 changes: 1 addition & 2 deletions
3
Lib9c.GraphQL/Objects/ItemObject.cs → Mimir/GraphQL/Objects/ItemObject.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Lib9c.GraphQL/Objects/SheetObject.cs → Mimir/GraphQL/Objects/SheetObject.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
namespace Lib9c.GraphQL.Objects; | ||
namespace Mimir.GraphQL.Objects; | ||
|
||
public class SheetObject | ||
{ | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.