Skip to content

Commit 956735d

Browse files
authored
Merge pull request #1 from nestjs/master
merge
2 parents 7b96060 + 7c5155d commit 956735d

File tree

104 files changed

+5978
-3023
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+5978
-3023
lines changed

.circleci/config.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
build:
2626
working_directory: ~/nest
2727
docker:
28-
- image: circleci/node:16
28+
- image: cimg/node:16.17
2929
steps:
3030
- checkout
3131
- *restore-cache
@@ -38,14 +38,20 @@ jobs:
3838
e2e_tests:
3939
working_directory: ~/nest
4040
docker:
41-
- image: circleci/node:16
41+
- image: cimg/node:16.17
4242
steps:
4343
- checkout
4444
- *restore-cache
4545
- *install-deps
4646
- run:
47-
name: E2E tests
48-
command: yarn test:e2e
47+
name: E2E tests (graphql)
48+
command: yarn test:e2e:graphql
49+
- run:
50+
name: E2E tests (apollo)
51+
command: yarn test:e2e:apollo
52+
- run:
53+
name: E2E tests (mercurius)
54+
command: yarn test:e2e:mercurius
4955

5056
workflows:
5157
version: 2
@@ -55,4 +61,3 @@ workflows:
5561
- e2e_tests:
5662
requires:
5763
- build
58-

.github/ISSUE_TEMPLATE/Bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ body:
5656
required: true
5757
attributes:
5858
label: "Expected behavior"
59-
description: "A clear and concise description of what you expected to happend (or code)"
59+
description: "A clear and concise description of what you expected to happen (or code)"
6060

6161
- type: markdown
6262
attributes:

.github/ISSUE_TEMPLATE/Regression.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ body:
6868
required: true
6969
attributes:
7070
label: "Expected behavior"
71-
description: "A clear and concise description of what you expected to happend (or code)"
71+
description: "A clear and concise description of what you expected to happen (or code)"
7272

7373
- type: textarea
7474
attributes:

.prettierignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
packages/**/tests/generated-definitions/*.ts
2-
packages/**/tests/**/*.fixture.ts
2+
packages/**/tests/**/*.fixture.ts
3+
4+
packages/**/tests/cases/**/*.ts
5+
packages/**/tests/cases/**/*.ts

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "10.0.13",
5+
"version": "10.1.1",
66
"npmClient": "yarn",
77
"useWorkspaces": true,
88
"changelog": {

package.json

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,44 +20,47 @@
2020
"publish:next": "lerna publish --dist-tag next",
2121
"test:e2e": "lerna run test:e2e --parallel",
2222
"test:e2e:dev": "lerna run test:e2e:dev --parallel",
23+
"test:e2e:apollo": "lerna run test:e2e --scope @nestjs/apollo --stream",
24+
"test:e2e:graphql": "lerna run test:e2e --scope @nestjs/graphql --stream",
25+
"test:e2e:mercurius": "lerna run test:e2e --scope @nestjs/mercurius --stream",
2326
"prepare": "husky install"
2427
},
2528
"resolutions": {
2629
"graphql": "15.8.0"
2730
},
2831
"devDependencies": {
29-
"@commitlint/cli": "17.0.1",
30-
"@commitlint/config-angular": "17.0.0",
32+
"@commitlint/cli": "17.1.2",
33+
"@commitlint/config-angular": "17.1.0",
3134
"@types/graphql": "14.5.0",
32-
"@types/jest": "27.5.1",
35+
"@types/jest": "29.0.0",
3336
"@types/node": "17.0.0",
3437
"@types/node-fetch": "3.0.3",
3538
"@types/normalize-path": "3.0.0",
3639
"@types/ws": "8.5.3",
37-
"@typescript-eslint/eslint-plugin": "5.27.0",
38-
"@typescript-eslint/parser": "5.27.0",
40+
"@typescript-eslint/eslint-plugin": "5.36.2",
41+
"@typescript-eslint/parser": "5.36.2",
3942
"class-transformer": "0.5.1",
4043
"class-validator": "0.13.2",
41-
"eslint": "8.16.0",
44+
"eslint": "8.23.0",
4245
"eslint-config-prettier": "8.5.0",
4346
"eslint-plugin-import": "2.26.0",
44-
"eslint-plugin-prettier": "4.0.0",
47+
"eslint-plugin-prettier": "4.2.1",
4548
"graphql": "15.8.0",
4649
"graphql-subscriptions": "2.0.0",
4750
"husky": "8.0.1",
48-
"jest": "28.1.0",
49-
"lerna": "5.0.0",
51+
"jest": "29.0.2",
52+
"lerna": "5.5.0",
5053
"lerna-changelog": "2.2.0",
51-
"lint-staged": "12.4.3",
52-
"prettier": "2.6.2",
54+
"lint-staged": "13.0.3",
55+
"prettier": "2.7.1",
5356
"reflect-metadata": "0.1.13",
54-
"release-it": "15.0.0",
57+
"release-it": "15.4.1",
5558
"rimraf": "3.0.2",
56-
"rxjs": "7.5.5",
57-
"supertest": "6.2.3",
58-
"ts-jest": "28.0.3",
59-
"ts-node": "10.8.0",
60-
"typescript": "4.7.2"
59+
"rxjs": "7.5.6",
60+
"supertest": "6.2.4",
61+
"ts-jest": "28.0.8",
62+
"ts-node": "10.9.1",
63+
"typescript": "4.8.2"
6164
},
6265
"changelog": {
6366
"labels": {

packages/apollo/package.json

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nestjs/apollo",
3-
"version": "10.0.13",
3+
"version": "10.1.0",
44
"description": "Nest - modern, fast, powerful node.js web framework (@apollo)",
55
"author": "Kamil Mysliwiec",
66
"license": "MIT",
@@ -15,26 +15,30 @@
1515
"url": "git+https://github.com/nestjs/graphql.git"
1616
},
1717
"scripts": {
18-
"test:e2e": "jest --config ./tests/jest-e2e.ts --runInBand",
18+
"test:e2e": "jest --config ./tests/jest-e2e.ts --runInBand && yarn test:e2e:fed2",
19+
"test:e2e:fed2": "jest --config ./tests/jest-e2e-fed2.ts --runInBand",
1920
"test:e2e:dev": "jest --config ./tests/jest-e2e.ts --runInBand --watch"
2021
},
2122
"bugs": {
2223
"url": "https://github.com/nestjs/graphql/issues"
2324
},
2425
"devDependencies": {
25-
"@apollo/gateway": "0.51.0",
26-
"@nestjs/common": "8.4.5",
27-
"@nestjs/core": "8.4.5",
28-
"@nestjs/platform-express": "8.4.5",
29-
"@nestjs/platform-fastify": "8.4.5",
30-
"@nestjs/testing": "8.4.5",
26+
"@apollo/gateway": "0.52.1",
27+
"@apollo/gateway-v2": "npm:@apollo/[email protected]",
28+
"@apollo/subgraph-v2": "npm:@apollo/[email protected]",
29+
"@nestjs/common": "8.4.7",
30+
"@nestjs/core": "8.4.7",
31+
"@nestjs/platform-express": "8.4.7",
32+
"@nestjs/platform-fastify": "8.4.7",
33+
"@nestjs/testing": "8.4.7",
3134
"apollo-cache-inmemory": "1.6.6",
3235
"apollo-client": "2.6.10",
3336
"apollo-link-ws": "1.0.20",
34-
"apollo-server-core": "3.8.1",
35-
"apollo-server-express": "3.8.1",
36-
"apollo-server-fastify": "3.8.1",
37-
"apollo-server-plugin-response-cache": "3.6.0"
37+
"apollo-server-core": "3.10.2",
38+
"apollo-server-express": "3.10.2",
39+
"apollo-server-fastify": "3.10.2",
40+
"apollo-server-plugin-response-cache": "3.7.0",
41+
"graphql-16": "npm:[email protected]"
3842
},
3943
"dependencies": {
4044
"iterall": "1.3.0",
@@ -43,12 +47,13 @@
4347
},
4448
"peerDependencies": {
4549
"@apollo/gateway": "^0.44.1 || ^0.46.0 || ^0.48.0 || ^0.49.0 || ^0.50.0 || ^2.0.0",
46-
"@nestjs/common": "^8.2.3",
47-
"@nestjs/core": "^8.2.3",
50+
"@nestjs/common": "^8.2.3 || ^9.0.0",
51+
"@nestjs/core": "^8.2.3 || ^9.0.0",
4852
"@nestjs/graphql": "^10.0.0",
4953
"apollo-server-core": "^3.5.0",
5054
"apollo-server-express": "^3.5.0",
51-
"apollo-server-fastify": "^3.5.0"
55+
"apollo-server-fastify": "^3.5.0",
56+
"graphql": "^15.8.0 || ^16.0.0"
5257
},
5358
"peerDependenciesMeta": {
5459
"@apollo/gateway": {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { IntrospectAndCompose } from '@apollo/gateway-v2';
2+
import { Module } from '@nestjs/common';
3+
import { GraphQLModule } from '@nestjs/graphql';
4+
import { ApolloGatewayDriver, ApolloGatewayDriverConfig } from '../../../lib';
5+
6+
@Module({
7+
imports: [
8+
GraphQLModule.forRoot<ApolloGatewayDriverConfig>({
9+
driver: ApolloGatewayDriver,
10+
gateway: {
11+
debug: false,
12+
supergraphSdl: new IntrospectAndCompose({
13+
subgraphs: [
14+
{ name: 'users', url: 'http://localhost:3001/graphql' },
15+
{ name: 'posts', url: 'http://localhost:3002/graphql' },
16+
],
17+
}),
18+
},
19+
}),
20+
],
21+
})
22+
export class AppModule {}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { Module } from '@nestjs/common';
2+
import { GraphQLModule } from '@nestjs/graphql';
3+
import { ApolloServerPluginInlineTraceDisabled } from 'apollo-server-core';
4+
import { ApolloDriverConfig } from '../../../lib';
5+
import { ApolloFederationDriver } from '../../../lib/drivers';
6+
import { PostsModule } from './posts/posts.module';
7+
import { User } from './posts/user.entity';
8+
9+
@Module({
10+
imports: [
11+
GraphQLModule.forRoot<ApolloDriverConfig>({
12+
driver: ApolloFederationDriver,
13+
autoSchemaFile: {
14+
federation: 2,
15+
},
16+
buildSchemaOptions: {
17+
orphanedTypes: [User],
18+
},
19+
plugins: [ApolloServerPluginInlineTraceDisabled()],
20+
}),
21+
PostsModule,
22+
],
23+
})
24+
export class AppModule {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { registerEnumType } from '@nestjs/graphql';
2+
3+
export enum PostType {
4+
IMAGE = 'IMAGE',
5+
TEXT = 'TEXT',
6+
}
7+
8+
registerEnumType(PostType, {
9+
name: 'PostType',
10+
});

0 commit comments

Comments
 (0)