Implement XAiMcpServer Stuffs ...

This commit is contained in:
2026-11-02 23:16:50 +03:30
parent 9e7710e345
commit 62aa8d51e6
31 changed files with 641 additions and 7 deletions
@@ -0,0 +1,21 @@
using System;
using xAiModels.Constants;
using xDataService.GraphQL;
using xAiModels.Models.Entities;
using xAiModels.Interfaces.Entities;
namespace xAiModels.Providers.GraphQL
{
public class XAiMcpServerGraphQLTypeHelper : XBaseGraphQLTypeHelper<XAiMcpServer, Guid>, IXAiMcpServerGraphQLTypeHelper
{
public override string GetInQueryCollectionName()
{
return XAiModelsConstants.XAiMcpServerCollectionName;
}
public override string GetInQuerySingleName()
{
return XAiModelsConstants.XAiMcpServerSingleName;
}
}
}
@@ -0,0 +1,23 @@
using System;
using GraphQL.Types;
using xDataService.GraphQL;
using xAiModels.Models.Entities;
using xDataService.Configuration;
using xAiModels.Interfaces.Entities;
namespace xAiModels.Providers.GraphQL
{
public class XAiMcpServerGraphQuery : XBaseGraphQLQuery<XAiMcpServer, Guid, XAiMcpServerGraphType, GuidGraphType>
{
public XAiMcpServerGraphQuery(
XDataServiceConfiguration configuration,
IXAiMcpServerRepository repository,
IXAiMcpServerGraphQLTypeHelper helper
) : base(
configuration,
repository,
helper
)
{ }
}
}
@@ -0,0 +1,13 @@
using System;
using GraphQL.Types;
namespace xAiModels.Providers.GraphQL
{
public class XAiMcpServerGraphSchema : Schema
{
public XAiMcpServerGraphSchema(IServiceProvider services) : base(services)
{
Query = (XAiMcpServerGraphQuery)services.GetService(typeof(XAiMcpServerGraphQuery));
}
}
}
@@ -0,0 +1,23 @@
using System;
using xDataService.GraphQL;
using xAiModels.Models.Entities;
namespace xAiModels.Providers.GraphQL
{
public class XAiMcpServerGraphType: XBaseGraphObjectType<XAiMcpServer, Guid>
{
public XAiMcpServerGraphType() : base()
{
Field(x => x.Name);
Field(x => x.Enabled);
Field(x => x.OwnerId);
Field(x => x.Headers);
Field(x => x.Endpoint);
Field(x => x.CreatedOn);
Field(x => x.UpdatedAt);
Field(x => x.Description);
Field(x => x.TimeoutSeconds);
Field(x => x.EnvironmentVariables);
}
}
}