Skip to content

Instantly share code, notes, and snippets.

@9renpoto
Created October 29, 2019 07:20
Show Gist options
  • Save 9renpoto/2b94a041ea8637484e6de6ad92bd1fd7 to your computer and use it in GitHub Desktop.
Save 9renpoto/2b94a041ea8637484e6de6ad92bd1fd7 to your computer and use it in GitHub Desktop.
import { join } from 'path'
import { GraphQLDefinitionsFactory } from '@nestjs/graphql'
const definitionsFactory = new GraphQLDefinitionsFactory()
definitionsFactory.generate({
typePaths: ['./src/schema.gql'],
path: join(process.cwd(), 'src/graphql.schema.ts'),
outputAs: 'interface',
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment