Skip to content

Instantly share code, notes, and snippets.

@relliv
Last active May 5, 2022 17:06
Show Gist options
  • Save relliv/b1a9b22b9f6e6e21843a8a3fb6e0684d to your computer and use it in GitHub Desktop.
Save relliv/b1a9b22b9f6e6e21843a8a3fb6e0684d to your computer and use it in GitHub Desktop.
Nest + GraphQL - 1
import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
@Module({
imports: [
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver, // <-- this is the driver we want to use
debug: true, // enable graphql debug
playground: true, // enable graphql playground
autoSchemaFile: 'schema.graphql', // path to graphql schema
}),
],
controllers: [],
providers: [],
})
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment