mirror of
https://github.com/IT4Change/boilerplate-backend.git
synced 2025-12-13 10:25:49 +00:00
19 lines
498 B
TypeScript
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,
|
|
},
|
|
})
|
|
}
|