2023-12-05 19:46:03 +01:00

19 lines
498 B
TypeScript

import { GraphQLSchema } from 'graphql'
import { buildSchema } from 'type-graphql'
import { HelloResolver } from './resolvers/HelloResolver'
export const schema = async (): Promise<GraphQLSchema> => {
return buildSchema({
resolvers: [HelloResolver],
validate: {
validationError: { target: false },
skipMissingProperties: true,
skipNullProperties: true,
skipUndefinedProperties: false,
forbidUnknownValues: true,
stopAtFirstError: true,
},
})
}