I try to implement this page's authChecker in doc.
But it's code was not compiled in Typescript because property authChecker is not defined.
Error message is below.
^
TSError: ⨯ Unable to compile TypeScript:
src/app.module.ts:50:9 - error TS2322: Type '{ AuthChecker: AuthChecker<Context, string>; }' is not assignable to type 'BuildSchemaOptions'.
Object literal may only specify known properties, and 'AuthChecker' does not exist in type 'BuildSchemaOptions'.
50 AuthChecker
~~~~~~~~~~~
/Users/hogehoge/temp/typeorm-graphql-nestjs-dataloader-starter-kit/node_modules/ts-node/src/index.ts:240
return new TSError(diagnosticText, diagnosticCodes)
^
and my code is below.
import { buildSchema } from "type-graphql"
buildSchema({
resolvers: [],
authChecker: () => {
return true
}
})
$ yarn exec tsc -v
1.19.2
Sorry, It's issue is my mistake.
Hello @diggymo, I'm having the same issue. What was your mistake and how did you fix it?
Most helpful comment
Hello @diggymo, I'm having the same issue. What was your mistake and how did you fix it?