import { ValidationError } from '@nestjs/common'; import { GraphQLError } from 'graphql/error'; /** * Recursively format validation errors into a GraphQL error * @param validationErrors - NestJS validation errors (class-validator) * returns a GraphQL error - GraphQLError with validation errors in extensions * * Extensions are formatted as follows: * ``` * { * code: 'BAD_USER_INPUT', * fieldErrors: { * field1: [ * { constraint: 'constraint1', message: 'message1', context: { ... } }, * { constraint: 'constraint2', message: 'message2', context: { ... } }, * ], * ``` */ export declare const exceptionFactory: (validationErrors: ValidationError[]) => GraphQLError; //# sourceMappingURL=exception.factory.d.ts.map