31 lines
No EOL
781 B
C#
31 lines
No EOL
781 B
C#
using Microsoft.AspNetCore.Builder;
|
|
using Microsoft.AspNetCore.Routing;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace IdentityShroud.GraphQL;
|
|
|
|
public static class RegistrationExtensions
|
|
{
|
|
extension(IServiceCollection services)
|
|
{
|
|
public IServiceCollection AddIdentityShroudGraphQL()
|
|
{
|
|
services
|
|
.AddGraphQLServer()
|
|
.AddMutationConventions(applyToAllMutations: true)
|
|
.AddMutationType<Mutation>()
|
|
.AddQueryType<Query>();
|
|
|
|
return services;
|
|
}
|
|
}
|
|
|
|
extension(IEndpointRouteBuilder app)
|
|
{
|
|
public IEndpointRouteBuilder MapIdentityShroudGraphQL()
|
|
{
|
|
app.MapGraphQL();
|
|
return app;
|
|
}
|
|
}
|
|
} |