Add Required Stuffs to running Project on net8.0 ...
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user