remove graph

This commit is contained in:
2025-11-22 10:49:31 +03:30
parent 2c0ab601f3
commit ee1e6049c5
42 changed files with 364 additions and 875 deletions
+1 -17
View File
@@ -1,25 +1,9 @@
import { ArgumentsHost, Catch, ExceptionFilter, HttpException, HttpStatus, ExecutionContext } from '@nestjs/common';
import { GqlExecutionContext } from '@nestjs/graphql';
import { ArgumentsHost, Catch, ExceptionFilter, HttpException, HttpStatus } from '@nestjs/common';
import { FastifyReply } from 'fastify';
@Catch(HttpException)
export class HttpExceptionFilter implements ExceptionFilter {
catch(exception: HttpException, host: ArgumentsHost) {
// Check if this is a GraphQL context
if (host.getType<'graphql' | 'http'>() === 'graphql') {
try {
// In GraphQL context, host is actually an ExecutionContext
const gqlContext = GqlExecutionContext.create(host as ExecutionContext);
if (gqlContext && gqlContext.getInfo()) {
// For GraphQL, let the exception propagate - GraphQL will handle it automatically
// We can't use HTTP response methods in GraphQL context
return;
}
} catch {
// Not a GraphQL context, continue with HTTP handling
}
}
// Handle HTTP/REST context
try {
const ctx = host.switchToHttp();