graphql: add graphql
This commit is contained in:
1 parent
8023fa5301
commit
c973f1c052
4 files changed
+1775
-1538
No files matched your search
+8
-2
@@ -22,16 +22,21 @@
|
||||
"test:e2e": "vitest run --config ./vitest.config.e2e.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apollo/server": "^5.5.2",
|
||||
"@as-integrations/express5": "^1.1.2",
|
||||
"@nestjs/apollo": "^14.2.0",
|
||||
"@nestjs/common": "^12.0.1",
|
||||
"@nestjs/core": "^12.0.1",
|
||||
"@nestjs/graphql": "^14.2.0",
|
||||
"@nestjs/platform-express": "^12.0.1",
|
||||
"@prisma/adapter-pg": "^7.10.1",
|
||||
"@prisma/client": "^7.10.1",
|
||||
"dotenv": "^18.0.10",
|
||||
"graphql": "^17.1.0",
|
||||
"pg": "^8.23.1",
|
||||
"prisma": "8.0.0-rc.33",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"rxjs": "^7.8.1"
|
||||
"rxjs": "^7.8.1",
|
||||
"ts-morph": "^28.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "^12.0.0",
|
||||
@@ -46,6 +51,7 @@
|
||||
"oxlint": "^1.58.0",
|
||||
"oxlint-tsgolint": "^7.0.2001",
|
||||
"prettier": "^3.4.2",
|
||||
"prisma": "7.10.1",
|
||||
"source-map-support": "^0.5.21",
|
||||
"supertest": "^7.0.0",
|
||||
"typescript": "^6.0.2",
|
||||
|
||||
File renamed without changes.
+21
-1
@@ -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],
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user