Add Required Stuffs to running Project on net8.0 ...

This commit is contained in:
2026-04-04 00:11:31 +03:30
parent f863f49af7
commit 058b55f4fa
28 changed files with 1194 additions and 11 deletions
+25
View File
@@ -0,0 +1,25 @@
using xAiApi.Data.Interfaces;
using xAiApi.Data.Models.Entities;
using xDataService.Configuration;
using xDataService.GraphQL;
namespace xAiApi.Data.GraphQL
{
public class XTestGraphQLTypeHelper : XBaseGraphQLTypeHelper<XTest, int>, IXTestGraphQLTypeHelper
{
public XTestGraphQLTypeHelper(
XDataServiceConfiguration configuration
) : base(configuration)
{ }
public override string GetInQueryCollectionName()
{
return "tests";
}
public override string GetInQuerySingleName()
{
return "test";
}
}
}
+22
View File
@@ -0,0 +1,22 @@
using GraphQL.Types;
using xAiApi.Data.Interfaces;
using xAiApi.Data.Models.Entities;
using xDataService.Configuration;
using xDataService.GraphQL;
namespace xAiApi.Data.GraphQL
{
public class XTestGraphQuery : XBaseGraphQLQuery<XTest, int, XTestGraphType, IntGraphType>
{
public XTestGraphQuery(
XDataServiceConfiguration configuration,
IXTestRepository repository,
IXTestGraphQLTypeHelper helper
) : base(
configuration,
repository,
helper
)
{ }
}
}
+13
View File
@@ -0,0 +1,13 @@
using System;
using GraphQL.Types;
namespace xAiApi.Data.GraphQL
{
public class XTestGraphSchema : Schema
{
public XTestGraphSchema(IServiceProvider services) : base(services)
{
Query = (XTestGraphQuery)services.GetService(typeof(XTestGraphQuery));
}
}
}
+13
View File
@@ -0,0 +1,13 @@
using xAiApi.Data.Models.Entities;
using xDataService.GraphQL;
namespace xAiApi.Data.GraphQL
{
public class XTestGraphType : XBaseGraphObjectType<XTest, int>
{
public XTestGraphType() : base()
{
Field(x => x.Title);
}
}
}