Files
xDataService/Models/XGraphQueryResult.cs
T
2026-09-06 00:20:06 +03:30

20 lines
669 B
C#

using xModels.Dtos;
using GraphQL.Types;
namespace xDataService.Models {
public class XGraphQueryResult<TEntity, TGraph> : ObjectGraphType<XQueryResult<TEntity>>
where TGraph : IGraphType {
public XGraphQueryResult () {
//
Name = $"{typeof(TGraph).Name}QueryResult";
//
Field<ListGraphType<TGraph>> (nameof (XQueryResult<TEntity>.Items));
Field (x => x.Page);
Field (x => x.PageSize);
Field (x => x.TotalPages);
Field (x => x.TotalFilteredItems);
Field (x => x.TotalItems);
}
}
}