Skip to content

Commit

Permalink
Pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
ipdae committed May 22, 2024
1 parent 33a6ba2 commit 24ebc6a
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 14 deletions.
5 changes: 5 additions & 0 deletions MarketService/GraphTypes/ElementalType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace MarketService.GraphTypes;

public class ElementalType : EnumType<Nekoyume.Model.Elemental.ElementalType>
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ protected override void Configure(IObjectTypeDescriptor<FungibleAssetValueProduc
.Type<NonNullType<ByteType>>();
descriptor.Field(f => f.Ticker)
.Type<StringType>();
descriptor.Implements<FungibleAssetValueProductSchemaType>();
// descriptor.Implements<FungibleAssetValueProductSchemaType>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ protected override void Configure(
{
descriptor.Field(f => f.DecimalPlaces);
descriptor.Field(f => f.Ticker);
descriptor.Implements<ProductSchemaType>();
// descriptor.Implements<ProductSchemaType>();
}
}
2 changes: 1 addition & 1 deletion MarketService/GraphTypes/ItemProductModelType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ protected override void Configure(IObjectTypeDescriptor<ItemProductModel> descri
descriptor.Field(f => f.Crystal);
descriptor.Field(f => f.CrystalPerPrice);
descriptor.Field(f => f.OptionCountFromCombination);
descriptor.Implements<ItemProductSchemaType>();
// descriptor.Implements<ItemProductSchemaType>();
}
}
2 changes: 1 addition & 1 deletion MarketService/GraphTypes/ItemProductSchemaType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ protected override void Configure(
{
descriptor.Ignore(f => f.SkillModels);
descriptor.Ignore(f => f.StatModels);
descriptor.Implements<ProductSchemaType>();
// descriptor.Implements<ProductSchemaType>();
}
}
2 changes: 0 additions & 2 deletions MarketService/Models/ProductModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ namespace MarketService.Models;
public class ProductModel : IProductSchema
{
[Key] public Guid ProductId { get; set; }
[UseFiltering]
public Address SellerAgentAddress { get; set; }
[UseFiltering]
public Address SellerAvatarAddress { get; set; }
public decimal Price { get; set; }
public decimal Quantity { get; set; }
Expand Down
18 changes: 10 additions & 8 deletions MarketService/QueryType.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using MarketService.GraphTypes;
using MarketService.Models;

namespace MarketService;

Expand All @@ -9,7 +10,8 @@ protected override void Configure(IObjectTypeDescriptor<Query> descriptor)
descriptor
.Field(f => f.GetProducts(default!))
.Type<ListType<ProductModelType>>()
// .UsePaging()
.UsePaging<ProductModelType>()
// .UsePaging<ProductModelType>()
.UseProjection()
.UseFiltering<ProductFilterType>()
.UseSorting();
Expand All @@ -20,12 +22,12 @@ protected override void Configure(IObjectTypeDescriptor<Query> descriptor)
// .UseProjection()
// .UseFiltering()
// .UseSorting();
// descriptor
// .Field(f => f.GetItemProducts(default!))
// .Type<ListType<ItemProductModelType>>()
// .UsePaging()
// .UseProjection()
// .UseFiltering()
// .UseSorting();
descriptor
.Field(f => f.GetItemProducts(default!))
.Type<ListType<ItemProductModelType>>()
// .UsePaging()
.UseProjection()
.UseFiltering()
.UseSorting();
}
}

0 comments on commit 24ebc6a

Please sign in to comment.