20 lines
492 B
C#
20 lines
492 B
C#
using FictionArchive.Service.NovelService.Models.Novels;
|
|
using FictionArchive.Service.NovelService.Services;
|
|
using HotChocolate.Authorization;
|
|
using HotChocolate.Data;
|
|
using HotChocolate.Types;
|
|
|
|
namespace FictionArchive.Service.NovelService.GraphQL;
|
|
|
|
public class Query
|
|
{
|
|
[Authorize]
|
|
[UsePaging]
|
|
[UseProjection]
|
|
[UseFiltering]
|
|
[UseSorting]
|
|
public IQueryable<Novel> GetNovels(NovelServiceDbContext dbContext)
|
|
{
|
|
return dbContext.Novels.AsQueryable();
|
|
}
|
|
} |