last ...
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user