33 lines
1006 B
TypeScript
33 lines
1006 B
TypeScript
import { join } from 'node:path';
|
|
import { Module } from '@nestjs/common';
|
|
import { GraphQLModule } from '@nestjs/graphql';
|
|
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
|
|
import { ApolloServerPluginLandingPageLocalDefault } from '@apollo/server/plugin/landingPage/default';
|
|
|
|
import { AppController } from './app.controller.js';
|
|
import { AppService } from './app.service.js';
|
|
import { ProfileModule } from './profile/profile.module.js';
|
|
|
|
@Module({
|
|
imports: [
|
|
GraphQLModule.forRoot<ApolloDriverConfig>({
|
|
driver: ApolloDriver,
|
|
|
|
autoSchemaFile: true,
|
|
sortSchema: true,
|
|
|
|
definitions: {
|
|
path: join(process.cwd(), 'src/graphql.ts'),
|
|
outputAs: 'class',
|
|
},
|
|
|
|
playground: false,
|
|
plugins: [ApolloServerPluginLandingPageLocalDefault()],
|
|
}),
|
|
ProfileModule,
|
|
],
|
|
controllers: [AppController],
|
|
providers: [AppService],
|
|
})
|
|
export class AppModule {}
|