use apollo studio as playground

This commit is contained in:
João Geonizeli
2022-09-09 18:38:24 -03:00
parent 61685a3063
commit df244377d8
2 changed files with 4 additions and 0 deletions

View File

@@ -28,6 +28,7 @@
"@nestjs/core": "^9.0.0",
"@nestjs/graphql": "^10.0.21",
"@nestjs/platform-express": "^9.0.0",
"apollo-server-core": "^3.10.1",
"apollo-server-express": "^3.10.1",
"axios-cache-adapter": "^2.7.3",
"camelcase-object-deep": "^1.1.7",

View File

@@ -3,6 +3,7 @@ import { HttpModule } from '@nestjs/axios';
import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { GraphQLModule } from '@nestjs/graphql';
import { ApolloServerPluginLandingPageLocalDefault } from 'apollo-server-core';
import { join } from 'path';
import { ThingResolver } from './thing/thing.resolver';
import { httpCacheAdapter } from './utils/httpCacheAdapter';
@@ -20,6 +21,8 @@ import { httpCacheAdapter } from './utils/httpCacheAdapter';
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
autoSchemaFile: join(process.cwd(), 'src/schema.gql'),
playground: false,
plugins: [ApolloServerPluginLandingPageLocalDefault()],
}),
],
providers: [ThingResolver],