This commit is contained in:
2026-07-26 21:19:40 +03:30
parent 429c07a02d
commit 2144e9f8a7
82 changed files with 2712 additions and 146 deletions
@@ -0,0 +1,21 @@
using System;
using xAiModels.Constants;
using xAiModels.Interfaces.Entities;
using xAiModels.Models.Entities;
using xDataService.GraphQL;
namespace xAiModels.Providers.GraphQL
{
public class XAiConversationGraphQLTypeHelper : XBaseGraphQLTypeHelper<XAiConversation, Guid>, IXAiConversationGraphQLTypeHelper
{
public override string GetInQueryCollectionName()
{
return XAiModelsConstants.XAiConversationCollectionName;
}
public override string GetInQuerySingleName()
{
return XAiModelsConstants.XAiConversationSignleName;
}
}
}
@@ -0,0 +1,23 @@
using System;
using GraphQL.Types;
using xAiModels.Interfaces.Entities;
using xAiModels.Models.Entities;
using xDataService.Configuration;
using xDataService.GraphQL;
namespace xAiModels.Providers.GraphQL
{
public class XAiConversationGraphQuery : XBaseGraphQLQuery<XAiConversation, Guid, XAiConversationGraphType, GuidGraphType>
{
public XAiConversationGraphQuery(
XDataServiceConfiguration configuration,
IXAiConversationRepository repository,
IXAiConversationGraphQLTypeHelper helper
) : base(
configuration,
repository,
helper
)
{ }
}
}
@@ -0,0 +1,13 @@
using System;
using GraphQL.Types;
namespace xAiModels.Providers.GraphQL
{
public class XAiConversationGraphSchema : Schema
{
public XAiConversationGraphSchema(IServiceProvider services) : base(services)
{
Query = (XAiConversationGraphQuery)services.GetService(typeof(XAiConversationGraphQuery));
}
}
}
@@ -0,0 +1,18 @@
using System;
using xAiModels.Models.Entities;
using xDataService.GraphQL;
namespace xAiModels.Providers.GraphQL
{
public class XAiConversationGraphType : XBaseGraphObjectType<XAiConversation, Guid>
{
public XAiConversationGraphType() : base()
{
Field(x => x.Title);
Field(x => x.OwnerId);
Field(x => x.CreatedOn);
Field(x => x.UpdatedAt);
Field(x => x.ProjectId);
}
}
}
@@ -0,0 +1,21 @@
using System;
using xAiModels.Constants;
using xAiModels.Interfaces.Entities;
using xAiModels.Models.Entities;
using xDataService.GraphQL;
namespace xAiModels.Providers.GraphQL
{
public class XAiMessageGraphQLTypeHelper : XBaseGraphQLTypeHelper<XAiMessage, Guid>, IXAiMessageGraphQLTypeHelper
{
public override string GetInQueryCollectionName()
{
return XAiModelsConstants.XAiMessageCollectionName;
}
public override string GetInQuerySingleName()
{
return XAiModelsConstants.XAiMessageSingleName;
}
}
}
+23
View File
@@ -0,0 +1,23 @@
using System;
using GraphQL.Types;
using xAiModels.Interfaces.Entities;
using xAiModels.Models.Entities;
using xDataService.Configuration;
using xDataService.GraphQL;
namespace xAiModels.Providers.GraphQL
{
public class XAiMessageGraphQuery : XBaseGraphQLQuery<XAiMessage, Guid, XAiMessageGraphType, GuidGraphType>
{
public XAiMessageGraphQuery(
XDataServiceConfiguration configuration,
IXAiMessageRepository repository,
IXAiMessageGraphQLTypeHelper helper
) : base(
configuration,
repository,
helper
)
{ }
}
}
@@ -0,0 +1,13 @@
using System;
using GraphQL.Types;
namespace xAiModels.Providers.GraphQL
{
public class XAiMessageGraphSchema : Schema
{
public XAiMessageGraphSchema(IServiceProvider services) : base(services)
{
Query = (XAiMessageGraphQuery)services.GetService(typeof(XAiMessageGraphQuery));
}
}
}
+20
View File
@@ -0,0 +1,20 @@
using System;
using xAiModels.Models.Entities;
using xDataService.GraphQL;
namespace xAiModels.Providers.GraphQL
{
public class XAiMessageGraphType: XBaseGraphObjectType<XAiMessage, Guid>
{
public XAiMessageGraphType() : base()
{
Field(x => x.Role);
Field(x => x.OwnerId);
Field(x => x.Content);
Field(x => x.Metadata);
Field(x => x.CreatedOn);
Field(x => x.UpdatedAt);
Field(x => x.ConversationId);
}
}
}
@@ -0,0 +1,21 @@
using System;
using xAiModels.Constants;
using xAiModels.Interfaces.Entities;
using xAiModels.Models.Entities;
using xDataService.GraphQL;
namespace xAiModels.Providers.GraphQL
{
public class XAiProjectGraphQLTypeHelper : XBaseGraphQLTypeHelper<XAiProject, Guid>, IXAiProjectGraphQLTypeHelper
{
public override string GetInQueryCollectionName()
{
return XAiModelsConstants.XAiProjectCollectionName;
}
public override string GetInQuerySingleName()
{
return XAiModelsConstants.XAiProjectSingleName;
}
}
}
+23
View File
@@ -0,0 +1,23 @@
using System;
using GraphQL.Types;
using xAiModels.Interfaces.Entities;
using xAiModels.Models.Entities;
using xDataService.Configuration;
using xDataService.GraphQL;
namespace xAiModels.Providers.GraphQL
{
public class XAiProjectGraphQuery : XBaseGraphQLQuery<XAiProject, Guid, XAiProjectGraphType, GuidGraphType>
{
public XAiProjectGraphQuery(
XDataServiceConfiguration configuration,
IXAiProjectRepository repository,
IXAiProjectGraphQLTypeHelper helper
) : base(
configuration,
repository,
helper
)
{ }
}
}
@@ -0,0 +1,13 @@
using System;
using GraphQL.Types;
namespace xAiModels.Providers.GraphQL
{
public class XAiProjectGraphSchema : Schema
{
public XAiProjectGraphSchema(IServiceProvider services) : base(services)
{
Query = (XAiProjectGraphQuery)services.GetService(typeof(XAiProjectGraphQuery));
}
}
}
+19
View File
@@ -0,0 +1,19 @@
using System;
using xAiModels.Models.Entities;
using xDataService.GraphQL;
namespace xAiModels.Providers.GraphQL
{
public class XAiProjectGraphType : XBaseGraphObjectType<XAiProject, Guid>
{
public XAiProjectGraphType() : base()
{
Field(x => x.Title);
Field(x => x.OwnerId);
Field(x => x.Prompt);
Field(x => x.CreatedOn);
Field(x => x.UpdatedAt);
Field(x => x.Description);
}
}
}