graphql: add graphql

This commit is contained in:
arswarog committed 2026-11-16 17:26:19 +03:00
1 parent 8023fa5301
commit c973f1c052
4 files changed
+1775 -1538

No files matched your search

+21 -1
View File
@@ -1,9 +1,29 @@
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';
@Module({
imports: [],
imports: [
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
autoSchemaFile: true,
sortSchema: true,
definitions: {
path: join(process.cwd(), 'src/graphql.ts'),
outputAs: 'class',
},
playground: false,
plugins: [ApolloServerPluginLandingPageLocalDefault()],
}),
],
controllers: [AppController],
providers: [AppService],
})