mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
15 lines
370 B
TypeScript
15 lines
370 B
TypeScript
import { GraphQLSchema } from 'graphql'
|
|
import { buildSchema } from 'type-graphql'
|
|
import path from 'path'
|
|
|
|
import isAuthorized from './directive/isAuthorized'
|
|
|
|
const schema = async (): Promise<GraphQLSchema> => {
|
|
return buildSchema({
|
|
resolvers: [path.join(__dirname, 'resolver', `!(*.test).{js,ts}`)],
|
|
authChecker: isAuthorized,
|
|
})
|
|
}
|
|
|
|
export default schema
|