I use NestJS with Graphql, and want to genrate type file with the schema.
generate type code
import { GraphQLDefinitionsFactory } from '@nestjs/graphql';
import { join } from 'path';
const definitionsFactory = new GraphQLDefinitionsFactory();
definitionsFactory.generate({
typePaths: ['./src/**/*.graphql'],
path: join(process.cwd(), 'src/**/*.ts'),
outputAs: 'class',
watch: true,
emitTypenameField: true,
});
above code generate graphql.ts, but i want to generate users.ts in users folder