I'm having a problem with generating TS typings for my graphql schema. The problem is that since I've already imported the typings while they existed, regenerating them does not work as it complains that the generated typings module does not exist (duh). The following is my codegen config:
require:
- ts-node/register/transpile-only
overwrite: true
schema: src/schema.ts
documents: null
generates:
src/__generated__/types.ts:
config:
scalars:
DateTime: Date
typesPrefix: GQL
plugins:
- "typescript"
- "typescript-resolvers"
I import types from resolvers like:
import { GQLMutationResolvers } from '../../../__generated__/types"
which it cannot find, while trying to generate the types. What do I need to change about my approach for this to work? Any help is appreciated!