using Application.Interfaces.Services; using Domain.Entities; using HotChocolate.Subscriptions; namespace GraphQLTEST.GraphQL.Mutations; [ExtendObjectType(nameof(MutationType))] public class KillMutations { public async Task RemoveKill(int id, [Service] IKillService service, [Service] ITopicEventSender eventSender, CancellationToken cancellationToken) { var kill = service.GetKillById(id); service.RemoveKill(kill); await eventSender.SendAsync(nameof(RemoveKill), kill, cancellationToken); return kill; } }