Fixed AuditInterceptor.cs , add GraphQL error logging, add translation request get
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user