push code chua nhi?
This commit is contained in:
@@ -12,7 +12,7 @@ import AuthzPlugin from '@pothos/plugin-authz'
|
||||
import ErrorsPlugin from '@pothos/plugin-errors'
|
||||
import type { FileUpload } from 'graphql-upload/processRequest.js'
|
||||
import GraphQLUpload from 'graphql-upload/GraphQLUpload.js'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { Injectable, Logger } from '@nestjs/common'
|
||||
import { PrismaCrudGenerator } from './graphql.generator'
|
||||
import type PrismaTypes from '../types/pothos.generated'
|
||||
import PrismaUtils from '@pothos/plugin-prisma-utils'
|
||||
@@ -107,6 +107,7 @@ export class Builder extends SchemaBuilder<SchemaBuilderOption> {
|
||||
// optionally customize how errors are formatted
|
||||
validationError: (zodError, _args, _context, _info) => {
|
||||
// the default behavior is to just throw the zod error directly
|
||||
Logger.error(zodError.message, 'Zod Error')
|
||||
return zodError
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user