Last active
May 5, 2022 17:06
-
-
Save relliv/b1a9b22b9f6e6e21843a8a3fb6e0684d to your computer and use it in GitHub Desktop.
Nest + GraphQL - 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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