Skip to content

Commit

Permalink
chore: upgrade apollo, fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Mar 10, 2023
1 parent 99dc8e6 commit e63f5c0
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 9 deletions.
11 changes: 9 additions & 2 deletions integration/graphql-code-first/e2e/pipes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,23 @@ describe('GraphQL Pipes', () => {
errors: [
{
extensions: {
code: 'BAD_USER_INPUT',
response: {
code: 'BAD_REQUEST',
originalError: {
error: 'Bad Request',
message: [
'description must be longer than or equal to 30 characters',
],
statusCode: 400,
},
},
locations: [
{
column: 3,
line: 2,
},
],
message: 'Bad Request Exception',
path: ['addRecipe'],
},
],
});
Expand Down
2 changes: 1 addition & 1 deletion integration/graphql-code-first/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ input NewRecipeInput {

type Subscription {
recipeAdded: Recipe!
}
}
1 change: 1 addition & 0 deletions integration/graphql-code-first/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { RecipesModule } from './recipes/recipes.module';
RecipesModule,
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
includeStacktraceInErrorResponses: false,
installSubscriptionHandlers: true,
autoSchemaFile: join(
process.cwd(),
Expand Down
4 changes: 2 additions & 2 deletions integration/graphql-code-first/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ValidationPipe } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { ApplicationModule } from './app.module';
import { AppModule } from './app.module';

async function bootstrap() {
const app = await NestFactory.create(ApplicationModule);
const app = await NestFactory.create(AppModule);
app.useGlobalPipes(new ValidationPipe());
await app.listen(3000);
}
Expand Down
1 change: 1 addition & 0 deletions integration/graphql-schema-first/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { CatsModule } from './cats/cats.module';
CatsModule,
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
includeStacktraceInErrorResponses: true,
typePaths: [join(__dirname, '**', '*.graphql')],
}),
],
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"@fastify/view": "7.4.1",
"@grpc/grpc-js": "1.8.12",
"@grpc/proto-loader": "0.7.5",
"@nestjs/apollo": "^11.0.0",
"@nestjs/apollo": "11.0.2",
"@nestjs/graphql": "11.0.0",
"@nestjs/mongoose": "9.2.1",
"@nestjs/typeorm": "9.0.1",
Expand Down

0 comments on commit e63f5c0

Please sign in to comment.