Claus-Peter Hübner 9547eff793 Merge remote-tracking branch 'origin/master' into
2428-feature-federation-implement-multiple-apollo-graphql-endpoints
2023-01-12 18:02:15 +01:00

18 lines
513 B
TypeScript

import { GraphQLSchema } from 'graphql'
import { buildSchema } from 'type-graphql'
// import isAuthorized from './directive/isAuthorized'
import DecimalScalar from './scalar/Decimal'
import Decimal from 'decimal.js-light'
import { getApiResolvers } from './api/schema'
const schema = async (): Promise<GraphQLSchema> => {
return await buildSchema({
resolvers: [getApiResolvers()],
// authChecker: isAuthorized,
scalarsMap: [{ type: Decimal, scalar: DecimalScalar }],
})
}
export default schema