adding Data Requirement on XContent Service ...

This commit is contained in:
2026-08-18 14:05:36 +03:30
parent 71fd4cea74
commit 0daa339d12
34 changed files with 1009 additions and 1 deletions
@@ -0,0 +1,21 @@
using System;
using xContentService.Constants;
using xContentService.Interfaces.Entities;
using xContentService.Models.Entities;
using xDataService.GraphQL;
namespace xContentService.Providers.GraphQL
{
public class XContentGraphQLTypeHelper : XBaseGraphQLTypeHelper<XContent, Guid>, IXContentGraphQLTypeHelper
{
public override string GetInQueryCollectionName()
{
return XContentServiceConstants.XContentCollectionName;
}
public override string GetInQuerySingleName()
{
return XContentServiceConstants.XContentSingleName;
}
}
}
+23
View File
@@ -0,0 +1,23 @@
using System;
using GraphQL.Types;
using xContentService.Interfaces.Entities;
using xContentService.Models.Entities;
using xDataService.Configuration;
using xDataService.GraphQL;
namespace xContentService.Providers.GraphQL
{
public class XContentGraphQuery : XBaseGraphQLQuery<XContent, Guid, XContentGraphType, GuidGraphType>
{
public XContentGraphQuery(
XDataServiceConfiguration configuration,
IXContentRepository repository,
IXContentGraphQLTypeHelper helper
) : base(
configuration,
repository,
helper
)
{ }
}
}
+13
View File
@@ -0,0 +1,13 @@
using System;
using GraphQL.Types;
namespace xContentService.Providers.GraphQL
{
public class XContentGraphSchema : Schema
{
public XContentGraphSchema(IServiceProvider services) : base(services)
{
Query = (XContentGraphQuery)services.GetService(typeof(XContentGraphQuery));
}
}
}
+18
View File
@@ -0,0 +1,18 @@
using System;
using xContentService.Models.Entities;
using xDataService.GraphQL;
namespace xContentService.Providers.GraphQL
{
public class XContentGraphType : XBaseGraphObjectType<XContent, Guid>
{
public XContentGraphType() : base()
{
Field(x => x.Title);
Field(x => x.OwnerId);
Field(x => x.CreatedOn);
Field(x => x.UpdatedAt);
Field(x => x.Description);
}
}
}