Skip to content

Commit

Permalink
feat: upgrade @nestjs/graphql (#405)
Browse files Browse the repository at this point in the history
* feat: upgrade @nestjs/graphql

* chore: bump v8.1.0

* chore: upgrade node 16

* fix: add @types/ws

* fix: add ts-morph
  • Loading branch information
9renpoto authored Apr 28, 2022
1 parent 5b0ef84 commit 58ed927
Show file tree
Hide file tree
Showing 7 changed files with 13,384 additions and 4,089 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
with:
node-version: '12.x'
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
6 changes: 4 additions & 2 deletions example/__tests__/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Test, TestingModule } from '@nestjs/testing';
import * as request from 'supertest';
import { INestApplication } from '@nestjs/common';
import { getApolloServer } from '@nestjs/graphql';
import type { ApolloServerBase } from 'apollo-server-core';
import gql from 'graphql-tag';
import { AppModule } from './../src/app.module';
import { GraphQLModule } from '@nestjs/graphql';
import { ApolloDriver } from '@nestjs/apollo';

describe('AppModule', () => {
let app: INestApplication;
Expand All @@ -18,7 +19,8 @@ describe('AppModule', () => {
app = moduleFixture.createNestApplication();
await app.init();

apolloClient = getApolloServer(moduleFixture);
const graphqlModule = app.get<GraphQLModule<ApolloDriver>>(GraphQLModule);
apolloClient = graphqlModule.graphQlAdapter?.instance;
});

afterAll(() => app.close());
Expand Down
4 changes: 3 additions & 1 deletion example/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import { APP_INTERCEPTOR } from '@nestjs/core';
import { GraphQLModule } from '@nestjs/graphql';
import { RavenInterceptor } from '../../lib';
import { GqlModule } from './gql/gql.module';
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';

@Module({
imports: [
GraphQLModule.forRoot({
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
autoSchemaFile: true,
debug: true,
playground: true,
Expand Down
Loading

0 comments on commit 58ed927

Please sign in to comment.