Updated translation service and finished splitting out responsibilities for now
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using FictionArchive.Service.Shared.Services.GraphQL;
|
||||
using HotChocolate.Execution.Configuration;
|
||||
using HotChocolate.Types.NodaTime;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace FictionArchive.Service.Shared.Extensions;
|
||||
|
||||
public static class GraphQLExtensions
|
||||
{
|
||||
public static IRequestExecutorBuilder AddDefaultGraphQl<TQuery, TMutation>(this IServiceCollection services) where TQuery : class where TMutation : class
|
||||
{
|
||||
return services.AddGraphQLServer()
|
||||
.AddQueryType<TQuery>()
|
||||
.AddMutationType<TMutation>()
|
||||
.AddType<UnsignedIntType>()
|
||||
.AddType<InstantType>()
|
||||
.AddMutationConventions(applyToAllMutations: true)
|
||||
.AddFiltering(opt => opt.AddDefaults().BindRuntimeType<uint, UnsignedIntOperationFilterInputType>())
|
||||
.AddSorting()
|
||||
.AddProjections();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user