Add String Service and Implement all of it's requirements as an xDashboard Package ...
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
using xDataService.Events;
|
||||
using xStringService.Interfaces.Entities;
|
||||
using xStringService.Models.Entities;
|
||||
|
||||
namespace xStringService.DataHelper.Events
|
||||
{
|
||||
public class XStringEvents : XBaseRepositoryEvents<XString>, IXStringEvents
|
||||
{}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using xDataService.Configuration;
|
||||
using xDataService.GraphQL;
|
||||
using xStringService.Interfaces.Entities;
|
||||
using xStringService.Models.Entities;
|
||||
|
||||
namespace xStringService.DataHelper.GraphQL
|
||||
{
|
||||
public class XStringGraphQLTypeHelper : XBaseGraphQLTypeHelper<XString, int>, IXStringGraphQLTypeHelper
|
||||
{
|
||||
public XStringGraphQLTypeHelper(
|
||||
XDataServiceConfiguration configuration
|
||||
) : base(configuration)
|
||||
{ }
|
||||
|
||||
public override string GetInQueryCollectionName()
|
||||
{
|
||||
return "strings";
|
||||
}
|
||||
|
||||
public override string GetInQuerySingleName()
|
||||
{
|
||||
return "string";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using GraphQL.Types;
|
||||
using xDataService.Configuration;
|
||||
using xDataService.GraphQL;
|
||||
using xStringService.Interfaces.Entities;
|
||||
using xStringService.Models.Entities;
|
||||
|
||||
namespace xDataHelper.GraphQL
|
||||
{
|
||||
public class XStringGraphQuery : XBaseGraphQLQuery<XString, int, XStringGraphType, IntGraphType>
|
||||
{
|
||||
public XStringGraphQuery(
|
||||
XDataServiceConfiguration configuration,
|
||||
IXStringRepository repository,
|
||||
IXStringGraphQLTypeHelper helper
|
||||
) : base(
|
||||
configuration,
|
||||
repository,
|
||||
helper
|
||||
)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using GraphQL.Types;
|
||||
|
||||
namespace xDataHelper.GraphQL
|
||||
{
|
||||
public class XStringGraphSchema : Schema
|
||||
{
|
||||
public XStringGraphSchema(IServiceProvider services) : base(services)
|
||||
{
|
||||
Query = (XStringGraphQuery)services.GetService(typeof(XStringGraphQuery));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using xDataService.GraphQL;
|
||||
using xStringService.Models.Entities;
|
||||
|
||||
namespace xDataHelper.GraphQL
|
||||
{
|
||||
public class XStringGraphType : XBaseGraphObjectType<XString, int>
|
||||
{
|
||||
public XStringGraphType() : base()
|
||||
{
|
||||
Field(x => x.Language);
|
||||
Field(x => x.ResourceTitle);
|
||||
Field(x => x.TranslatedValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user