-
I've been trying to follow examples here https://graphql-code-generator.com/docs/plugins/typescript-resolvers#usage-example and trying to get these generated types to work but somehow type inference is not working for I have this code and I'm using import { Resolvers } from "./schema-codegen";
export const resolvers: Resolvers = {
Query: {
comment: (parent, args, context) => {
return null;
}
}
} as const; schema-codegen.ts is generated using codegen and I'm using I'm using TypeScript 4.1.2 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Found the reason. It was that |
Beta Was this translation helpful? Give feedback.
Found the reason. It was that
as const
I had at the end that broke type inference.