last works on Implementing XBotUser Entity and Repository Implementation based on xDataService ...
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using xDataService.GraphQL;
|
||||
using xDataService.Configuration;
|
||||
using xBotService.Models.Entities;
|
||||
using xBotService.Interfaces.Entities;
|
||||
using xBotService.Constants;
|
||||
|
||||
namespace xBotService.Providers.GraphQL
|
||||
{
|
||||
public class XBotUserGraphQLTypeHelper : XBaseGraphQLTypeHelper<XBotUser, int>, IXBotUserGraphQLTypeHelper
|
||||
{
|
||||
public XBotUserGraphQLTypeHelper(
|
||||
XDataServiceConfiguration configuration
|
||||
)
|
||||
: base(configuration)
|
||||
{
|
||||
}
|
||||
|
||||
public override string GetInQueryCollectionName()
|
||||
{
|
||||
return XBotServiceConstants.XBotUserCollectionName;
|
||||
}
|
||||
|
||||
public override string GetInQuerySingleName()
|
||||
{
|
||||
return XBotServiceConstants.XBotUserSingleName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using GraphQL.Types;
|
||||
using xDataService.GraphQL;
|
||||
using xDataService.Configuration;
|
||||
using xBotService.Models.Entities;
|
||||
using xBotService.Interfaces.Entities;
|
||||
|
||||
namespace xBotService.Providers.GraphQL
|
||||
{
|
||||
public class XBotUserGraphQuery : XBaseGraphQLQuery<XBotUser, int, XBotUserGraphType, IntGraphType>
|
||||
{
|
||||
public XBotUserGraphQuery(
|
||||
XDataServiceConfiguration configuration,
|
||||
IXBotUserRepository repository,
|
||||
IXBotUserGraphQLTypeHelper helper
|
||||
) : base(configuration, repository, helper)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using GraphQL.Types;
|
||||
|
||||
namespace xBotService.Providers.GraphQL
|
||||
{
|
||||
public class XBotUserGraphSchema : Schema
|
||||
{
|
||||
public XBotUserGraphSchema(IServiceProvider services) : base(services)
|
||||
{
|
||||
Query = (XBotUserGraphQuery)services.GetService(typeof(XBotUserGraphQuery));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using xDataService.GraphQL;
|
||||
using xBotService.Models.Entities;
|
||||
|
||||
namespace xBotService.Providers.GraphQL
|
||||
{
|
||||
public class XBotUserGraphType : XBaseGraphObjectType<XBotUser, int>
|
||||
{
|
||||
public XBotUserGraphType() : base()
|
||||
{
|
||||
Field(x => x.UserId);
|
||||
Field(x => x.BotUserName);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user