Fixed AuditInterceptor.cs , add GraphQL error logging, add translation request get

This commit is contained in:
gamer147
2025-11-18 13:14:31 -05:00
parent 0c1705ebe1
commit 716087e4a4
6 changed files with 56 additions and 4 deletions

View File

@@ -0,0 +1,20 @@
using HotChocolate.Execution;
using HotChocolate.Execution.Instrumentation;
using Microsoft.Extensions.Logging;
namespace FictionArchive.Service.Shared.Services.GraphQL;
public class ErrorEventListener : ExecutionDiagnosticEventListener
{
private readonly ILogger<ErrorEventListener> _logger;
public ErrorEventListener(ILogger<ErrorEventListener> logger)
{
_logger = logger;
}
public override void RequestError(IRequestContext context, Exception exception)
{
_logger.LogError(exception, "An error occurred while processing a GraphQL request.");
}
}