From d2d394fb9594d17d479c8122094d5b475c2a3ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Sat, 29 Feb 2020 13:21:21 +0100 Subject: [PATCH] sample(): update sample to use code-first graphql --- .../e2e/code-first.spec.ts} | 2 +- .../e2e/guards-filters.spec.ts | 0 .../e2e/pipes.spec.ts | 0 .../package-lock.json | 316 +++++++++++++++--- .../package.json | 3 +- .../graphql-code-first}/schema.gql | 7 +- .../src/app.module.ts | 5 +- .../src/common/filters/unauthorized.filter.ts | 0 .../src/common/guards/auth.guard.ts | 0 .../common/interceptors/data.interceptor.ts | 0 .../src/common/scalars/date.scalar.ts | 0 .../src/main.ts | 0 .../src/recipes/dto/new-recipe.input.ts | 2 +- .../src/recipes/dto/recipes.args.ts | 2 +- .../src/recipes/models/recipe.ts | 2 +- .../src/recipes/recipes.module.ts | 0 .../src/recipes/recipes.resolver.ts | 0 .../src/recipes/recipes.service.ts | 0 .../tsconfig.json | 0 .../e2e/graphql-async-class.spec.ts | 0 .../e2e/graphql-async-existing.spec.ts | 0 .../e2e/graphql-async.spec.ts | 0 .../e2e/graphql-request-scoped.spec.ts | 0 .../e2e/graphql.spec.ts | 0 .../package-lock.json | 0 .../package.json | 0 .../src/app.module.ts | 0 .../src/async-options-class.module.ts | 0 .../src/async-options-existing.module.ts | 0 .../src/async-options.module.ts | 0 .../src/cats/cats-request-scoped.service.ts | 0 .../src/cats/cats.guard.ts | 0 .../src/cats/cats.module.ts | 0 .../src/cats/cats.resolvers.ts | 0 .../src/cats/cats.service.ts | 0 .../src/cats/cats.types.graphql | 0 .../src/cats/interfaces/cat.interface.ts | 0 .../src/common/scalars/date.scalar.ts | 0 .../src/config.module.ts | 0 .../src/config.service.ts | 0 .../src/main.ts | 0 .../tsconfig.json | 0 integration/hello-world/package-lock.json | 2 +- .../nest-application/package-lock.json | 3 + integration/scopes/package-lock.json | 2 +- .../.eslintrc.js | 0 .../.gitignore | 0 .../README.md | 0 .../nest-cli.json | 0 .../package-lock.json | 0 .../package.json | 0 .../src/app.module.ts | 0 .../src/cats/cats.graphql | 0 .../src/cats/cats.guard.ts | 0 .../src/cats/cats.module.ts | 0 .../src/cats/cats.resolvers.ts | 0 .../src/cats/cats.service.ts | 0 .../src/cats/dto/create-cat.dto.ts | 0 .../src/common/scalars/date.scalar.ts | 0 .../src/generate-typings.ts | 0 .../src/graphql.schema.ts | 0 .../src/main.ts | 0 .../tsconfig.build.json | 0 .../tsconfig.json | 0 .../.eslintrc.js | 0 .../.gitignore | 0 .../package-lock.json | 238 ++++++++++--- .../package.json | 5 +- .../23-graphql-code-first}/schema.gql | 7 +- .../src/app.module.ts | 0 .../src/common/scalars/date.scalar.ts | 0 .../src/main.ts | 0 .../src/recipes/dto/new-recipe.input.ts | 2 +- .../src/recipes/dto/recipes.args.ts | 2 +- .../src/recipes/models/recipe.ts | 2 +- .../src/recipes/recipes.module.ts | 0 .../src/recipes/recipes.resolver.ts | 0 .../src/recipes/recipes.service.ts | 0 .../tsconfig.build.json | 0 .../tsconfig.json | 0 80 files changed, 484 insertions(+), 118 deletions(-) rename integration/{typegraphql/e2e/typegraphql.spec.ts => graphql-code-first/e2e/code-first.spec.ts} (95%) rename integration/{typegraphql => graphql-code-first}/e2e/guards-filters.spec.ts (100%) rename integration/{typegraphql => graphql-code-first}/e2e/pipes.spec.ts (100%) rename integration/{typegraphql => graphql-code-first}/package-lock.json (90%) rename integration/{typegraphql => graphql-code-first}/package.json (92%) rename {sample/23-type-graphql => integration/graphql-code-first}/schema.gql (71%) rename integration/{typegraphql => graphql-code-first}/src/app.module.ts (76%) rename integration/{typegraphql => graphql-code-first}/src/common/filters/unauthorized.filter.ts (100%) rename integration/{typegraphql => graphql-code-first}/src/common/guards/auth.guard.ts (100%) rename integration/{typegraphql => graphql-code-first}/src/common/interceptors/data.interceptor.ts (100%) rename integration/{typegraphql => graphql-code-first}/src/common/scalars/date.scalar.ts (100%) rename integration/{typegraphql => graphql-code-first}/src/main.ts (100%) rename integration/{typegraphql => graphql-code-first}/src/recipes/dto/new-recipe.input.ts (86%) rename integration/{typegraphql => graphql-code-first}/src/recipes/dto/recipes.args.ts (76%) rename {sample/23-type-graphql => integration/graphql-code-first}/src/recipes/models/recipe.ts (81%) rename integration/{typegraphql => graphql-code-first}/src/recipes/recipes.module.ts (100%) rename integration/{typegraphql => graphql-code-first}/src/recipes/recipes.resolver.ts (100%) rename integration/{typegraphql => graphql-code-first}/src/recipes/recipes.service.ts (100%) rename integration/{typegraphql => graphql-code-first}/tsconfig.json (100%) rename integration/{graphql => graphql-schema-first}/e2e/graphql-async-class.spec.ts (100%) rename integration/{graphql => graphql-schema-first}/e2e/graphql-async-existing.spec.ts (100%) rename integration/{graphql => graphql-schema-first}/e2e/graphql-async.spec.ts (100%) rename integration/{graphql => graphql-schema-first}/e2e/graphql-request-scoped.spec.ts (100%) rename integration/{graphql => graphql-schema-first}/e2e/graphql.spec.ts (100%) rename integration/{graphql => graphql-schema-first}/package-lock.json (100%) rename integration/{graphql => graphql-schema-first}/package.json (100%) rename integration/{graphql => graphql-schema-first}/src/app.module.ts (100%) rename integration/{graphql => graphql-schema-first}/src/async-options-class.module.ts (100%) rename integration/{graphql => graphql-schema-first}/src/async-options-existing.module.ts (100%) rename integration/{graphql => graphql-schema-first}/src/async-options.module.ts (100%) rename integration/{graphql => graphql-schema-first}/src/cats/cats-request-scoped.service.ts (100%) rename integration/{graphql => graphql-schema-first}/src/cats/cats.guard.ts (100%) rename integration/{graphql => graphql-schema-first}/src/cats/cats.module.ts (100%) rename integration/{graphql => graphql-schema-first}/src/cats/cats.resolvers.ts (100%) rename integration/{graphql => graphql-schema-first}/src/cats/cats.service.ts (100%) rename integration/{graphql => graphql-schema-first}/src/cats/cats.types.graphql (100%) rename integration/{graphql => graphql-schema-first}/src/cats/interfaces/cat.interface.ts (100%) rename integration/{graphql => graphql-schema-first}/src/common/scalars/date.scalar.ts (100%) rename integration/{graphql => graphql-schema-first}/src/config.module.ts (100%) rename integration/{graphql => graphql-schema-first}/src/config.service.ts (100%) rename integration/{graphql => graphql-schema-first}/src/main.ts (100%) rename integration/{graphql => graphql-schema-first}/tsconfig.json (100%) create mode 100644 integration/nest-application/package-lock.json rename sample/{12-graphql-apollo => 12-graphql-schema-first}/.eslintrc.js (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/.gitignore (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/README.md (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/nest-cli.json (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/package-lock.json (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/package.json (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/src/app.module.ts (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/src/cats/cats.graphql (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/src/cats/cats.guard.ts (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/src/cats/cats.module.ts (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/src/cats/cats.resolvers.ts (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/src/cats/cats.service.ts (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/src/cats/dto/create-cat.dto.ts (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/src/common/scalars/date.scalar.ts (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/src/generate-typings.ts (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/src/graphql.schema.ts (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/src/main.ts (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/tsconfig.build.json (100%) rename sample/{12-graphql-apollo => 12-graphql-schema-first}/tsconfig.json (100%) rename sample/{23-type-graphql => 23-graphql-code-first}/.eslintrc.js (100%) rename sample/{23-type-graphql => 23-graphql-code-first}/.gitignore (100%) rename sample/{23-type-graphql => 23-graphql-code-first}/package-lock.json (98%) rename sample/{23-type-graphql => 23-graphql-code-first}/package.json (95%) rename {integration/typegraphql => sample/23-graphql-code-first}/schema.gql (71%) rename sample/{23-type-graphql => 23-graphql-code-first}/src/app.module.ts (100%) rename sample/{23-type-graphql => 23-graphql-code-first}/src/common/scalars/date.scalar.ts (100%) rename sample/{23-type-graphql => 23-graphql-code-first}/src/main.ts (100%) rename sample/{23-type-graphql => 23-graphql-code-first}/src/recipes/dto/new-recipe.input.ts (85%) rename sample/{23-type-graphql => 23-graphql-code-first}/src/recipes/dto/recipes.args.ts (78%) rename {integration/typegraphql => sample/23-graphql-code-first}/src/recipes/models/recipe.ts (81%) rename sample/{23-type-graphql => 23-graphql-code-first}/src/recipes/recipes.module.ts (100%) rename sample/{23-type-graphql => 23-graphql-code-first}/src/recipes/recipes.resolver.ts (100%) rename sample/{23-type-graphql => 23-graphql-code-first}/src/recipes/recipes.service.ts (100%) rename sample/{23-type-graphql => 23-graphql-code-first}/tsconfig.build.json (100%) rename sample/{23-type-graphql => 23-graphql-code-first}/tsconfig.json (100%) diff --git a/integration/typegraphql/e2e/typegraphql.spec.ts b/integration/graphql-code-first/e2e/code-first.spec.ts similarity index 95% rename from integration/typegraphql/e2e/typegraphql.spec.ts rename to integration/graphql-code-first/e2e/code-first.spec.ts index 840813f2c..3a2cb97b3 100644 --- a/integration/typegraphql/e2e/typegraphql.spec.ts +++ b/integration/graphql-code-first/e2e/code-first.spec.ts @@ -3,7 +3,7 @@ import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { ApplicationModule } from '../src/app.module'; -describe('TypeGraphQL', () => { +describe('GraphQL - Code-first', () => { let app: INestApplication; beforeEach(async () => { diff --git a/integration/typegraphql/e2e/guards-filters.spec.ts b/integration/graphql-code-first/e2e/guards-filters.spec.ts similarity index 100% rename from integration/typegraphql/e2e/guards-filters.spec.ts rename to integration/graphql-code-first/e2e/guards-filters.spec.ts diff --git a/integration/typegraphql/e2e/pipes.spec.ts b/integration/graphql-code-first/e2e/pipes.spec.ts similarity index 100% rename from integration/typegraphql/e2e/pipes.spec.ts rename to integration/graphql-code-first/e2e/pipes.spec.ts diff --git a/integration/typegraphql/package-lock.json b/integration/graphql-code-first/package-lock.json similarity index 90% rename from integration/typegraphql/package-lock.json rename to integration/graphql-code-first/package-lock.json index 346e62eec..a08b35ce1 100644 --- a/integration/typegraphql/package-lock.json +++ b/integration/graphql-code-first/package-lock.json @@ -4,6 +4,87 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@apollo/federation": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@apollo/federation/-/federation-0.10.3.tgz", + "integrity": "sha512-GH87B7XBp1B8PJEceRs4KdeDnSyjNNeOqJNGMfkWAK74pxaF3beCzSwkrXFgNgDD8wliskEf2pVAxW4BHrb/Pw==", + "optional": true, + "requires": { + "apollo-graphql": "^0.3.4", + "apollo-server-env": "^2.4.3", + "core-js": "^3.4.0", + "lodash.xorby": "^4.7.0" + }, + "dependencies": { + "apollo-graphql": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/apollo-graphql/-/apollo-graphql-0.3.7.tgz", + "integrity": "sha512-ghW16xx9tRcyL38Pw6G5OidMnYn+CNUGZWmvqQgEO2nRy4T0ONPZZBOvGrIMtJQ70oEykNMKGm0zm6PdHdxd8Q==", + "optional": true, + "requires": { + "apollo-env": "^0.6.1", + "lodash.sortby": "^4.7.0" + } + } + } + }, + "@apollo/gateway": { + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@apollo/gateway/-/gateway-0.10.9.tgz", + "integrity": "sha512-Iumcpgzff92bqMNXvaO1ZJ9YMfmETNBJ7xp6Jx9ujcbOTNh2GiftQDYXov/5WiRLaIwwXFBNNUFA/dPbTGowow==", + "optional": true, + "requires": { + "@apollo/federation": "^0.10.3", + "apollo-engine-reporting-protobuf": "^0.4.1", + "apollo-env": "^0.5.1", + "apollo-graphql": "^0.3.4", + "apollo-server-caching": "^0.5.0", + "apollo-server-core": "^2.9.8", + "apollo-server-env": "^2.4.3", + "apollo-server-types": "^0.2.5", + "graphql-extensions": "^0.10.4", + "loglevel": "^1.6.1", + "loglevel-debug": "^0.0.1", + "pretty-format": "^24.7.0" + }, + "dependencies": { + "apollo-env": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/apollo-env/-/apollo-env-0.5.1.tgz", + "integrity": "sha512-fndST2xojgSdH02k5hxk1cbqA9Ti8RX4YzzBoAB4oIe1Puhq7+YlhXGXfXB5Y4XN0al8dLg+5nAkyjNAR2qZTw==", + "optional": true, + "requires": { + "core-js": "^3.0.1", + "node-fetch": "^2.2.0", + "sha.js": "^2.4.11" + } + }, + "apollo-graphql": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/apollo-graphql/-/apollo-graphql-0.3.7.tgz", + "integrity": "sha512-ghW16xx9tRcyL38Pw6G5OidMnYn+CNUGZWmvqQgEO2nRy4T0ONPZZBOvGrIMtJQ70oEykNMKGm0zm6PdHdxd8Q==", + "optional": true, + "requires": { + "apollo-env": "^0.6.1", + "lodash.sortby": "^4.7.0" + }, + "dependencies": { + "apollo-env": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/apollo-env/-/apollo-env-0.6.1.tgz", + "integrity": "sha512-B9BgpQGR1ndeDtb4Gtor0J4CITQ+OPACZrVW6lgStnljKEe9ZB76DZ1dAd3OCeizAswW6Lo9uvfK8jhVS5nBhQ==", + "optional": true, + "requires": { + "@types/node-fetch": "2.5.4", + "core-js": "^3.0.1", + "node-fetch": "^2.2.0", + "sha.js": "^2.4.11" + } + } + } + } + } + }, "@apollo/protobufjs": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@apollo/protobufjs/-/protobufjs-1.0.3.tgz", @@ -68,6 +149,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/@dsherret/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", "integrity": "sha1-H2R13IvZdM6gei2vOGSzF7HdMyw=", + "optional": true, "requires": { "is-absolute": "^1.0.0", "is-negated-glob": "^1.0.0" @@ -110,6 +192,17 @@ } } }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "optional": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, "@kamilkisiela/graphql-tools": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/@kamilkisiela/graphql-tools/-/graphql-tools-4.0.6.tgz", @@ -177,39 +270,34 @@ } }, "@nestjs/graphql": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/@nestjs/graphql/-/graphql-6.5.4.tgz", - "integrity": "sha512-t+l8+2SgY7u3yUDyzuffMD5728hdK9E8wX/AjCbm5PKDEMdDgNuA9pAj/UoRZNaeXYVcFazQZztMRMzHnMjHQg==", + "version": "7.0.0-next.1", + "resolved": "https://registry.npmjs.org/@nestjs/graphql/-/graphql-7.0.0-next.1.tgz", + "integrity": "sha512-Xm1G/1tfSRG1XdEiQRLu7MEJRD4WYC1YTSUQHHch5vA2ZTFqCVMxKyIbXS+Ak+y1WsZJATCiKrgAPsPoI2ZLbg==", "requires": { - "@types/graphql": "14.2.3", + "@apollo/federation": "^0.10.1", + "@apollo/gateway": "^0.10.8", "chokidar": "3.3.1", - "fast-glob": "3.1.1", - "graphql-tools": "4.0.6", + "fast-glob": "3.2.2", + "graphql-tools": "4.0.7", "iterall": "1.2.2", "lodash": "4.17.15", "merge-graphql-schemas": "1.7.6", "normalize-path": "3.0.0", - "ts-morph": "5.0.0", + "ts-morph": "^5.0.0", + "tslib": "1.10.0", "type-graphql": "^0.17.3", - "uuid": "3.3.3" + "uuid": "3.4.0" }, "dependencies": { - "graphql-tools": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-4.0.6.tgz", - "integrity": "sha512-jHLQw8x3xmSNRBCsaZqelXXsFfUSUSktSCUP8KYHiX1Z9qEuwcMpAf+FkdBzk8aTAFqOlPdNZ3OI4DKKqGKUqg==", - "requires": { - "apollo-link": "^1.2.3", - "apollo-utilities": "^1.0.1", - "deprecated-decorator": "^0.1.6", - "iterall": "^1.1.3", - "uuid": "^3.1.0" - } + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" }, "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" } } }, @@ -304,6 +392,7 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.1.1.tgz", "integrity": "sha512-8TLlC85CXgKNoTeqoXtrscPmKDbQCBfwZJ4hqli/QI4STa7sD2H6UqI9LSg8uBV5FYaD0QSdj/mtrCDrELvF+Q==", + "optional": true, "requires": { "@dsherret/to-absolute-glob": "^2.0.2", "fs-extra": "^8.1.0", @@ -318,6 +407,7 @@ "version": "10.0.2", "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "optional": true, "requires": { "@types/glob": "^7.1.1", "array-union": "^2.1.0", @@ -376,9 +466,10 @@ } }, "@types/events": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", - "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", + "optional": true }, "@types/express": { "version": "4.17.2", @@ -411,17 +502,13 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", + "optional": true, "requires": { "@types/events": "*", "@types/minimatch": "*", "@types/node": "*" } }, - "@types/graphql": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.2.3.tgz", - "integrity": "sha512-UoCovaxbJIxagCvVfalfK7YaNhmxj3BQFRQ2RHQKLiu+9wNXhJnlbspsLHt/YQM99IaLUUFJNzCwzc6W0ypMeQ==" - }, "@types/graphql-upload": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/@types/graphql-upload/-/graphql-upload-8.0.3.tgz", @@ -438,6 +525,31 @@ "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.1.tgz", "integrity": "sha512-PGAK759pxyfXE78NbKxyfRcWYA/KwW17X290cNev/qAsn9eQIxkH4shoNBafH37wewhDG/0p1cHPbK6+SzZjWQ==" }, + "@types/istanbul-lib-coverage": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", + "integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==", + "optional": true + }, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "optional": true, + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz", + "integrity": "sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA==", + "optional": true, + "requires": { + "@types/istanbul-lib-coverage": "*", + "@types/istanbul-lib-report": "*" + } + }, "@types/keygrip": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.2.tgz", @@ -477,7 +589,8 @@ "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "optional": true }, "@types/node": { "version": "7.10.9", @@ -498,9 +611,10 @@ "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==" }, "@types/semver": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.2.0.tgz", - "integrity": "sha512-1OzrNb4RuAzIT7wHSsgZRlMBlNsJl+do6UblR7JMW4oB7bbR+uBEYtUh7gEc/jM84GGilh68lSOokyM/zNUlBA==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.2.1.tgz", + "integrity": "sha512-+beqKQOh9PYxuHvijhVl+tIHvT6tuwOrE9m14zd+MT2A38KoKZhh7pYJ0SNleLtwDsiIxHDsIk9bv01oOxvSvA==", + "optional": true }, "@types/serve-static": { "version": "1.13.3", @@ -524,6 +638,21 @@ "@types/node": "*" } }, + "@types/yargs": { + "version": "13.0.8", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.8.tgz", + "integrity": "sha512-XAvHLwG7UQ+8M4caKIH0ZozIOYay5fQkAgyIXegXT9jPtdIGdhga+sUEdAr1CiG46aB+c64xQEYyEzlwWVTNzA==", + "optional": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-15.0.0.tgz", + "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==", + "optional": true + }, "@wry/equality": { "version": "0.1.9", "resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.1.9.tgz", @@ -555,6 +684,15 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "optional": true, + "requires": { + "color-convert": "^1.9.0" + } + }, "anymatch": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", @@ -775,7 +913,8 @@ "array-differ": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==" + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", + "optional": true }, "array-flatten": { "version": "1.1.1", @@ -790,7 +929,8 @@ "arrify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==" + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "optional": true }, "async-limiter": { "version": "1.0.0", @@ -988,7 +1128,8 @@ "code-block-writer": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-10.1.0.tgz", - "integrity": "sha512-RG9hpXtWFeUWhuUav1YuP/vGcyncW+t90yJLk9fNZs1De2OuHTHKAKThVCokt29PYq5RoJ0QSZaIZ+rvPO23hA==" + "integrity": "sha512-RG9hpXtWFeUWhuUav1YuP/vGcyncW+t90yJLk9fNZs1De2OuHTHKAKThVCokt29PYq5RoJ0QSZaIZ+rvPO23hA==", + "optional": true }, "color-convert": { "version": "1.9.2", @@ -1317,15 +1458,16 @@ } }, "fast-glob": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.1.1.tgz", - "integrity": "sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz", + "integrity": "sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==", "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.0", "merge2": "^1.3.0", - "micromatch": "^4.0.2" + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" } }, "fast-json-stable-stringify": { @@ -1339,11 +1481,11 @@ "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" }, "fastq": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.0.tgz", - "integrity": "sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.1.tgz", + "integrity": "sha512-mpIH5sKYueh3YyeJwqtVo8sORi0CgtmkVbK6kZStpQlZBYQuTzG2CZ7idSiJuA7bY0SFCWUc5WIs+oYumGCQNw==", "requires": { - "reusify": "^1.0.0" + "reusify": "^1.0.4" } }, "fill-range": { @@ -1405,6 +1547,7 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "optional": true, "requires": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", @@ -1469,7 +1612,8 @@ "graceful-fs": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "optional": true }, "graphql": { "version": "14.6.0", @@ -1493,6 +1637,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/graphql-query-complexity/-/graphql-query-complexity-0.3.0.tgz", "integrity": "sha512-JVqHT81Eh9O17iOjs1r1qzsh5YY2upfA3zoUsQGggT4d+1hajWitk4GQQY5SZtq5eul7y6jMsM9qRUSOAKhDJQ==", + "optional": true, "requires": { "lodash.get": "^4.4.2" } @@ -1611,6 +1756,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "optional": true, "requires": { "is-relative": "^1.0.0", "is-windows": "^1.0.1" @@ -1650,7 +1796,8 @@ "is-negated-glob": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=" + "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "optional": true }, "is-number": { "version": "7.0.0", @@ -1674,6 +1821,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "optional": true, "requires": { "is-unc-path": "^1.0.0" } @@ -1690,6 +1838,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "optional": true, "requires": { "unc-path-regex": "^0.1.2" } @@ -1697,7 +1846,8 @@ "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "optional": true }, "iterall": { "version": "1.2.2", @@ -1729,6 +1879,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "optional": true, "requires": { "graceful-fs": "^4.1.6" } @@ -1741,13 +1892,35 @@ "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "optional": true }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" }, + "lodash.xorby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.xorby/-/lodash.xorby-4.7.0.tgz", + "integrity": "sha1-nBmm+fBjputT3QPBtocXmYAUY9c=", + "optional": true + }, + "loglevel": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.7.tgz", + "integrity": "sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A==", + "optional": true + }, + "loglevel-debug": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/loglevel-debug/-/loglevel-debug-0.0.1.tgz", + "integrity": "sha1-ifidPboTy6iiy0YV1dOtcYn0iik=", + "optional": true, + "requires": { + "loglevel": "^1.4.0" + } + }, "long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", @@ -1886,6 +2059,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", + "optional": true, "requires": { "@types/minimatch": "^3.0.3", "array-differ": "^3.0.0", @@ -2006,6 +2180,26 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==" }, + "pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "optional": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "optional": true + } + } + }, "proxy-addr": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", @@ -2050,6 +2244,12 @@ } } }, + "react-is": { + "version": "16.13.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.0.tgz", + "integrity": "sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA==", + "optional": true + }, "readdirp": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz", @@ -2299,6 +2499,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-5.0.0.tgz", "integrity": "sha512-VP5dFnOzmlsDkSyuGczgVNtyJdYXMxFqMO2Rb0pIeni0o0Cy/nDljETBWhJs4FI4DIWv7Ftq69kgZO8p8w6LCw==", + "optional": true, "requires": { "@dsherret/to-absolute-glob": "^2.0.2", "@ts-morph/common": "~0.1.0", @@ -2362,6 +2563,7 @@ "version": "0.17.6", "resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-0.17.6.tgz", "integrity": "sha512-UFZaMMnpae3zeu9qCdWN82hm8wQeYu/+sQFbG5v3vlTtctZ9Xle9bvNi/rzSbQaG94K9Y5O5AGxjVKKMpEAMYA==", + "optional": true, "requires": { "@types/glob": "^7.1.1", "@types/node": "*", @@ -2377,12 +2579,14 @@ "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "optional": true }, "tslib": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", + "optional": true } } }, @@ -2403,12 +2607,14 @@ "unc-path-regex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "optional": true }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "optional": true }, "unixify": { "version": "1.0.0", diff --git a/integration/typegraphql/package.json b/integration/graphql-code-first/package.json similarity index 92% rename from integration/typegraphql/package.json rename to integration/graphql-code-first/package.json index ec053ad48..8d3bf441d 100644 --- a/integration/typegraphql/package.json +++ b/integration/graphql-code-first/package.json @@ -11,7 +11,7 @@ "dependencies": { "@nestjs/common": "6.11.7", "@nestjs/core": "6.11.7", - "@nestjs/graphql": "6.5.4", + "@nestjs/graphql": "7.0.0-next.1", "apollo-server-express": "2.10.1", "class-transformer": "0.2.3", "class-validator": "0.11.0", @@ -20,7 +20,6 @@ "reflect-metadata": "0.1.13", "rxjs": "6.5.4", "subscriptions-transport-ws": "0.9.16", - "type-graphql": "0.17.6", "typescript": "3.7.2", "ws": "7.2.1" }, diff --git a/sample/23-type-graphql/schema.gql b/integration/graphql-code-first/schema.gql similarity index 71% rename from sample/23-type-graphql/schema.gql rename to integration/graphql-code-first/schema.gql index 5257a02a5..48150069f 100644 --- a/sample/23-type-graphql/schema.gql +++ b/integration/graphql-code-first/schema.gql @@ -1,7 +1,6 @@ -# ----------------------------------------------- -# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!! -# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!! -# ----------------------------------------------- +# ------------------------------------------------------ +# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY) +# ------------------------------------------------------ """Date custom scalar type""" scalar Date diff --git a/integration/typegraphql/src/app.module.ts b/integration/graphql-code-first/src/app.module.ts similarity index 76% rename from integration/typegraphql/src/app.module.ts rename to integration/graphql-code-first/src/app.module.ts index b40fdc14c..4fd71db94 100644 --- a/integration/typegraphql/src/app.module.ts +++ b/integration/graphql-code-first/src/app.module.ts @@ -9,7 +9,10 @@ import { RecipesModule } from './recipes/recipes.module'; GraphQLModule.forRoot({ debug: false, installSubscriptionHandlers: true, - autoSchemaFile: join(process.cwd(), 'integration/typegraphql/schema.gql'), + autoSchemaFile: join( + process.cwd(), + 'integration/graphql-code-first/schema.gql', + ), }), ], }) diff --git a/integration/typegraphql/src/common/filters/unauthorized.filter.ts b/integration/graphql-code-first/src/common/filters/unauthorized.filter.ts similarity index 100% rename from integration/typegraphql/src/common/filters/unauthorized.filter.ts rename to integration/graphql-code-first/src/common/filters/unauthorized.filter.ts diff --git a/integration/typegraphql/src/common/guards/auth.guard.ts b/integration/graphql-code-first/src/common/guards/auth.guard.ts similarity index 100% rename from integration/typegraphql/src/common/guards/auth.guard.ts rename to integration/graphql-code-first/src/common/guards/auth.guard.ts diff --git a/integration/typegraphql/src/common/interceptors/data.interceptor.ts b/integration/graphql-code-first/src/common/interceptors/data.interceptor.ts similarity index 100% rename from integration/typegraphql/src/common/interceptors/data.interceptor.ts rename to integration/graphql-code-first/src/common/interceptors/data.interceptor.ts diff --git a/integration/typegraphql/src/common/scalars/date.scalar.ts b/integration/graphql-code-first/src/common/scalars/date.scalar.ts similarity index 100% rename from integration/typegraphql/src/common/scalars/date.scalar.ts rename to integration/graphql-code-first/src/common/scalars/date.scalar.ts diff --git a/integration/typegraphql/src/main.ts b/integration/graphql-code-first/src/main.ts similarity index 100% rename from integration/typegraphql/src/main.ts rename to integration/graphql-code-first/src/main.ts diff --git a/integration/typegraphql/src/recipes/dto/new-recipe.input.ts b/integration/graphql-code-first/src/recipes/dto/new-recipe.input.ts similarity index 86% rename from integration/typegraphql/src/recipes/dto/new-recipe.input.ts rename to integration/graphql-code-first/src/recipes/dto/new-recipe.input.ts index e1c776349..b69e07401 100644 --- a/integration/typegraphql/src/recipes/dto/new-recipe.input.ts +++ b/integration/graphql-code-first/src/recipes/dto/new-recipe.input.ts @@ -1,6 +1,6 @@ +import { Field, InputType } from '@nestjs/graphql'; import { Type } from 'class-transformer'; import { Length, MaxLength } from 'class-validator'; -import { Field, InputType } from 'type-graphql'; @InputType() export class NewRecipeInput { diff --git a/integration/typegraphql/src/recipes/dto/recipes.args.ts b/integration/graphql-code-first/src/recipes/dto/recipes.args.ts similarity index 76% rename from integration/typegraphql/src/recipes/dto/recipes.args.ts rename to integration/graphql-code-first/src/recipes/dto/recipes.args.ts index dcb996f35..9bce0582f 100644 --- a/integration/typegraphql/src/recipes/dto/recipes.args.ts +++ b/integration/graphql-code-first/src/recipes/dto/recipes.args.ts @@ -1,5 +1,5 @@ +import { ArgsType, Field, Int } from '@nestjs/graphql'; import { Max, Min } from 'class-validator'; -import { ArgsType, Field, Int } from 'type-graphql'; @ArgsType() export class RecipesArgs { diff --git a/sample/23-type-graphql/src/recipes/models/recipe.ts b/integration/graphql-code-first/src/recipes/models/recipe.ts similarity index 81% rename from sample/23-type-graphql/src/recipes/models/recipe.ts rename to integration/graphql-code-first/src/recipes/models/recipe.ts index 461330489..337942199 100644 --- a/sample/23-type-graphql/src/recipes/models/recipe.ts +++ b/integration/graphql-code-first/src/recipes/models/recipe.ts @@ -1,4 +1,4 @@ -import { Field, ID, ObjectType } from 'type-graphql'; +import { Field, ID, ObjectType } from '@nestjs/graphql'; @ObjectType() export class Recipe { diff --git a/integration/typegraphql/src/recipes/recipes.module.ts b/integration/graphql-code-first/src/recipes/recipes.module.ts similarity index 100% rename from integration/typegraphql/src/recipes/recipes.module.ts rename to integration/graphql-code-first/src/recipes/recipes.module.ts diff --git a/integration/typegraphql/src/recipes/recipes.resolver.ts b/integration/graphql-code-first/src/recipes/recipes.resolver.ts similarity index 100% rename from integration/typegraphql/src/recipes/recipes.resolver.ts rename to integration/graphql-code-first/src/recipes/recipes.resolver.ts diff --git a/integration/typegraphql/src/recipes/recipes.service.ts b/integration/graphql-code-first/src/recipes/recipes.service.ts similarity index 100% rename from integration/typegraphql/src/recipes/recipes.service.ts rename to integration/graphql-code-first/src/recipes/recipes.service.ts diff --git a/integration/typegraphql/tsconfig.json b/integration/graphql-code-first/tsconfig.json similarity index 100% rename from integration/typegraphql/tsconfig.json rename to integration/graphql-code-first/tsconfig.json diff --git a/integration/graphql/e2e/graphql-async-class.spec.ts b/integration/graphql-schema-first/e2e/graphql-async-class.spec.ts similarity index 100% rename from integration/graphql/e2e/graphql-async-class.spec.ts rename to integration/graphql-schema-first/e2e/graphql-async-class.spec.ts diff --git a/integration/graphql/e2e/graphql-async-existing.spec.ts b/integration/graphql-schema-first/e2e/graphql-async-existing.spec.ts similarity index 100% rename from integration/graphql/e2e/graphql-async-existing.spec.ts rename to integration/graphql-schema-first/e2e/graphql-async-existing.spec.ts diff --git a/integration/graphql/e2e/graphql-async.spec.ts b/integration/graphql-schema-first/e2e/graphql-async.spec.ts similarity index 100% rename from integration/graphql/e2e/graphql-async.spec.ts rename to integration/graphql-schema-first/e2e/graphql-async.spec.ts diff --git a/integration/graphql/e2e/graphql-request-scoped.spec.ts b/integration/graphql-schema-first/e2e/graphql-request-scoped.spec.ts similarity index 100% rename from integration/graphql/e2e/graphql-request-scoped.spec.ts rename to integration/graphql-schema-first/e2e/graphql-request-scoped.spec.ts diff --git a/integration/graphql/e2e/graphql.spec.ts b/integration/graphql-schema-first/e2e/graphql.spec.ts similarity index 100% rename from integration/graphql/e2e/graphql.spec.ts rename to integration/graphql-schema-first/e2e/graphql.spec.ts diff --git a/integration/graphql/package-lock.json b/integration/graphql-schema-first/package-lock.json similarity index 100% rename from integration/graphql/package-lock.json rename to integration/graphql-schema-first/package-lock.json diff --git a/integration/graphql/package.json b/integration/graphql-schema-first/package.json similarity index 100% rename from integration/graphql/package.json rename to integration/graphql-schema-first/package.json diff --git a/integration/graphql/src/app.module.ts b/integration/graphql-schema-first/src/app.module.ts similarity index 100% rename from integration/graphql/src/app.module.ts rename to integration/graphql-schema-first/src/app.module.ts diff --git a/integration/graphql/src/async-options-class.module.ts b/integration/graphql-schema-first/src/async-options-class.module.ts similarity index 100% rename from integration/graphql/src/async-options-class.module.ts rename to integration/graphql-schema-first/src/async-options-class.module.ts diff --git a/integration/graphql/src/async-options-existing.module.ts b/integration/graphql-schema-first/src/async-options-existing.module.ts similarity index 100% rename from integration/graphql/src/async-options-existing.module.ts rename to integration/graphql-schema-first/src/async-options-existing.module.ts diff --git a/integration/graphql/src/async-options.module.ts b/integration/graphql-schema-first/src/async-options.module.ts similarity index 100% rename from integration/graphql/src/async-options.module.ts rename to integration/graphql-schema-first/src/async-options.module.ts diff --git a/integration/graphql/src/cats/cats-request-scoped.service.ts b/integration/graphql-schema-first/src/cats/cats-request-scoped.service.ts similarity index 100% rename from integration/graphql/src/cats/cats-request-scoped.service.ts rename to integration/graphql-schema-first/src/cats/cats-request-scoped.service.ts diff --git a/integration/graphql/src/cats/cats.guard.ts b/integration/graphql-schema-first/src/cats/cats.guard.ts similarity index 100% rename from integration/graphql/src/cats/cats.guard.ts rename to integration/graphql-schema-first/src/cats/cats.guard.ts diff --git a/integration/graphql/src/cats/cats.module.ts b/integration/graphql-schema-first/src/cats/cats.module.ts similarity index 100% rename from integration/graphql/src/cats/cats.module.ts rename to integration/graphql-schema-first/src/cats/cats.module.ts diff --git a/integration/graphql/src/cats/cats.resolvers.ts b/integration/graphql-schema-first/src/cats/cats.resolvers.ts similarity index 100% rename from integration/graphql/src/cats/cats.resolvers.ts rename to integration/graphql-schema-first/src/cats/cats.resolvers.ts diff --git a/integration/graphql/src/cats/cats.service.ts b/integration/graphql-schema-first/src/cats/cats.service.ts similarity index 100% rename from integration/graphql/src/cats/cats.service.ts rename to integration/graphql-schema-first/src/cats/cats.service.ts diff --git a/integration/graphql/src/cats/cats.types.graphql b/integration/graphql-schema-first/src/cats/cats.types.graphql similarity index 100% rename from integration/graphql/src/cats/cats.types.graphql rename to integration/graphql-schema-first/src/cats/cats.types.graphql diff --git a/integration/graphql/src/cats/interfaces/cat.interface.ts b/integration/graphql-schema-first/src/cats/interfaces/cat.interface.ts similarity index 100% rename from integration/graphql/src/cats/interfaces/cat.interface.ts rename to integration/graphql-schema-first/src/cats/interfaces/cat.interface.ts diff --git a/integration/graphql/src/common/scalars/date.scalar.ts b/integration/graphql-schema-first/src/common/scalars/date.scalar.ts similarity index 100% rename from integration/graphql/src/common/scalars/date.scalar.ts rename to integration/graphql-schema-first/src/common/scalars/date.scalar.ts diff --git a/integration/graphql/src/config.module.ts b/integration/graphql-schema-first/src/config.module.ts similarity index 100% rename from integration/graphql/src/config.module.ts rename to integration/graphql-schema-first/src/config.module.ts diff --git a/integration/graphql/src/config.service.ts b/integration/graphql-schema-first/src/config.service.ts similarity index 100% rename from integration/graphql/src/config.service.ts rename to integration/graphql-schema-first/src/config.service.ts diff --git a/integration/graphql/src/main.ts b/integration/graphql-schema-first/src/main.ts similarity index 100% rename from integration/graphql/src/main.ts rename to integration/graphql-schema-first/src/main.ts diff --git a/integration/graphql/tsconfig.json b/integration/graphql-schema-first/tsconfig.json similarity index 100% rename from integration/graphql/tsconfig.json rename to integration/graphql-schema-first/tsconfig.json diff --git a/integration/hello-world/package-lock.json b/integration/hello-world/package-lock.json index fe81cda4b..7bc114626 100644 --- a/integration/hello-world/package-lock.json +++ b/integration/hello-world/package-lock.json @@ -790,7 +790,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { diff --git a/integration/nest-application/package-lock.json b/integration/nest-application/package-lock.json new file mode 100644 index 000000000..48e341a09 --- /dev/null +++ b/integration/nest-application/package-lock.json @@ -0,0 +1,3 @@ +{ + "lockfileVersion": 1 +} diff --git a/integration/scopes/package-lock.json b/integration/scopes/package-lock.json index fe81cda4b..7bc114626 100644 --- a/integration/scopes/package-lock.json +++ b/integration/scopes/package-lock.json @@ -790,7 +790,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { diff --git a/sample/12-graphql-apollo/.eslintrc.js b/sample/12-graphql-schema-first/.eslintrc.js similarity index 100% rename from sample/12-graphql-apollo/.eslintrc.js rename to sample/12-graphql-schema-first/.eslintrc.js diff --git a/sample/12-graphql-apollo/.gitignore b/sample/12-graphql-schema-first/.gitignore similarity index 100% rename from sample/12-graphql-apollo/.gitignore rename to sample/12-graphql-schema-first/.gitignore diff --git a/sample/12-graphql-apollo/README.md b/sample/12-graphql-schema-first/README.md similarity index 100% rename from sample/12-graphql-apollo/README.md rename to sample/12-graphql-schema-first/README.md diff --git a/sample/12-graphql-apollo/nest-cli.json b/sample/12-graphql-schema-first/nest-cli.json similarity index 100% rename from sample/12-graphql-apollo/nest-cli.json rename to sample/12-graphql-schema-first/nest-cli.json diff --git a/sample/12-graphql-apollo/package-lock.json b/sample/12-graphql-schema-first/package-lock.json similarity index 100% rename from sample/12-graphql-apollo/package-lock.json rename to sample/12-graphql-schema-first/package-lock.json diff --git a/sample/12-graphql-apollo/package.json b/sample/12-graphql-schema-first/package.json similarity index 100% rename from sample/12-graphql-apollo/package.json rename to sample/12-graphql-schema-first/package.json diff --git a/sample/12-graphql-apollo/src/app.module.ts b/sample/12-graphql-schema-first/src/app.module.ts similarity index 100% rename from sample/12-graphql-apollo/src/app.module.ts rename to sample/12-graphql-schema-first/src/app.module.ts diff --git a/sample/12-graphql-apollo/src/cats/cats.graphql b/sample/12-graphql-schema-first/src/cats/cats.graphql similarity index 100% rename from sample/12-graphql-apollo/src/cats/cats.graphql rename to sample/12-graphql-schema-first/src/cats/cats.graphql diff --git a/sample/12-graphql-apollo/src/cats/cats.guard.ts b/sample/12-graphql-schema-first/src/cats/cats.guard.ts similarity index 100% rename from sample/12-graphql-apollo/src/cats/cats.guard.ts rename to sample/12-graphql-schema-first/src/cats/cats.guard.ts diff --git a/sample/12-graphql-apollo/src/cats/cats.module.ts b/sample/12-graphql-schema-first/src/cats/cats.module.ts similarity index 100% rename from sample/12-graphql-apollo/src/cats/cats.module.ts rename to sample/12-graphql-schema-first/src/cats/cats.module.ts diff --git a/sample/12-graphql-apollo/src/cats/cats.resolvers.ts b/sample/12-graphql-schema-first/src/cats/cats.resolvers.ts similarity index 100% rename from sample/12-graphql-apollo/src/cats/cats.resolvers.ts rename to sample/12-graphql-schema-first/src/cats/cats.resolvers.ts diff --git a/sample/12-graphql-apollo/src/cats/cats.service.ts b/sample/12-graphql-schema-first/src/cats/cats.service.ts similarity index 100% rename from sample/12-graphql-apollo/src/cats/cats.service.ts rename to sample/12-graphql-schema-first/src/cats/cats.service.ts diff --git a/sample/12-graphql-apollo/src/cats/dto/create-cat.dto.ts b/sample/12-graphql-schema-first/src/cats/dto/create-cat.dto.ts similarity index 100% rename from sample/12-graphql-apollo/src/cats/dto/create-cat.dto.ts rename to sample/12-graphql-schema-first/src/cats/dto/create-cat.dto.ts diff --git a/sample/12-graphql-apollo/src/common/scalars/date.scalar.ts b/sample/12-graphql-schema-first/src/common/scalars/date.scalar.ts similarity index 100% rename from sample/12-graphql-apollo/src/common/scalars/date.scalar.ts rename to sample/12-graphql-schema-first/src/common/scalars/date.scalar.ts diff --git a/sample/12-graphql-apollo/src/generate-typings.ts b/sample/12-graphql-schema-first/src/generate-typings.ts similarity index 100% rename from sample/12-graphql-apollo/src/generate-typings.ts rename to sample/12-graphql-schema-first/src/generate-typings.ts diff --git a/sample/12-graphql-apollo/src/graphql.schema.ts b/sample/12-graphql-schema-first/src/graphql.schema.ts similarity index 100% rename from sample/12-graphql-apollo/src/graphql.schema.ts rename to sample/12-graphql-schema-first/src/graphql.schema.ts diff --git a/sample/12-graphql-apollo/src/main.ts b/sample/12-graphql-schema-first/src/main.ts similarity index 100% rename from sample/12-graphql-apollo/src/main.ts rename to sample/12-graphql-schema-first/src/main.ts diff --git a/sample/12-graphql-apollo/tsconfig.build.json b/sample/12-graphql-schema-first/tsconfig.build.json similarity index 100% rename from sample/12-graphql-apollo/tsconfig.build.json rename to sample/12-graphql-schema-first/tsconfig.build.json diff --git a/sample/12-graphql-apollo/tsconfig.json b/sample/12-graphql-schema-first/tsconfig.json similarity index 100% rename from sample/12-graphql-apollo/tsconfig.json rename to sample/12-graphql-schema-first/tsconfig.json diff --git a/sample/23-type-graphql/.eslintrc.js b/sample/23-graphql-code-first/.eslintrc.js similarity index 100% rename from sample/23-type-graphql/.eslintrc.js rename to sample/23-graphql-code-first/.eslintrc.js diff --git a/sample/23-type-graphql/.gitignore b/sample/23-graphql-code-first/.gitignore similarity index 100% rename from sample/23-type-graphql/.gitignore rename to sample/23-graphql-code-first/.gitignore diff --git a/sample/23-type-graphql/package-lock.json b/sample/23-graphql-code-first/package-lock.json similarity index 98% rename from sample/23-type-graphql/package-lock.json rename to sample/23-graphql-code-first/package-lock.json index 931625e7d..483fdaa53 100644 --- a/sample/23-type-graphql/package-lock.json +++ b/sample/23-graphql-code-first/package-lock.json @@ -904,6 +904,125 @@ } } }, + "@apollo/federation": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@apollo/federation/-/federation-0.10.3.tgz", + "integrity": "sha512-GH87B7XBp1B8PJEceRs4KdeDnSyjNNeOqJNGMfkWAK74pxaF3beCzSwkrXFgNgDD8wliskEf2pVAxW4BHrb/Pw==", + "optional": true, + "requires": { + "apollo-graphql": "^0.3.4", + "apollo-server-env": "^2.4.3", + "core-js": "^3.4.0", + "lodash.xorby": "^4.7.0" + }, + "dependencies": { + "apollo-graphql": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/apollo-graphql/-/apollo-graphql-0.3.7.tgz", + "integrity": "sha512-ghW16xx9tRcyL38Pw6G5OidMnYn+CNUGZWmvqQgEO2nRy4T0ONPZZBOvGrIMtJQ70oEykNMKGm0zm6PdHdxd8Q==", + "optional": true, + "requires": { + "apollo-env": "^0.6.1", + "lodash.sortby": "^4.7.0" + } + } + } + }, + "@apollo/gateway": { + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@apollo/gateway/-/gateway-0.10.9.tgz", + "integrity": "sha512-Iumcpgzff92bqMNXvaO1ZJ9YMfmETNBJ7xp6Jx9ujcbOTNh2GiftQDYXov/5WiRLaIwwXFBNNUFA/dPbTGowow==", + "optional": true, + "requires": { + "@apollo/federation": "^0.10.3", + "apollo-engine-reporting-protobuf": "^0.4.1", + "apollo-env": "^0.5.1", + "apollo-graphql": "^0.3.4", + "apollo-server-caching": "^0.5.0", + "apollo-server-core": "^2.9.8", + "apollo-server-env": "^2.4.3", + "apollo-server-types": "^0.2.5", + "graphql-extensions": "^0.10.4", + "loglevel": "^1.6.1", + "loglevel-debug": "^0.0.1", + "pretty-format": "^24.7.0" + }, + "dependencies": { + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "optional": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/yargs": { + "version": "13.0.8", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.8.tgz", + "integrity": "sha512-XAvHLwG7UQ+8M4caKIH0ZozIOYay5fQkAgyIXegXT9jPtdIGdhga+sUEdAr1CiG46aB+c64xQEYyEzlwWVTNzA==", + "optional": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "optional": true + }, + "apollo-env": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/apollo-env/-/apollo-env-0.5.1.tgz", + "integrity": "sha512-fndST2xojgSdH02k5hxk1cbqA9Ti8RX4YzzBoAB4oIe1Puhq7+YlhXGXfXB5Y4XN0al8dLg+5nAkyjNAR2qZTw==", + "optional": true, + "requires": { + "core-js": "^3.0.1", + "node-fetch": "^2.2.0", + "sha.js": "^2.4.11" + } + }, + "apollo-graphql": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/apollo-graphql/-/apollo-graphql-0.3.7.tgz", + "integrity": "sha512-ghW16xx9tRcyL38Pw6G5OidMnYn+CNUGZWmvqQgEO2nRy4T0ONPZZBOvGrIMtJQ70oEykNMKGm0zm6PdHdxd8Q==", + "optional": true, + "requires": { + "apollo-env": "^0.6.1", + "lodash.sortby": "^4.7.0" + }, + "dependencies": { + "apollo-env": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/apollo-env/-/apollo-env-0.6.1.tgz", + "integrity": "sha512-B9BgpQGR1ndeDtb4Gtor0J4CITQ+OPACZrVW6lgStnljKEe9ZB76DZ1dAd3OCeizAswW6Lo9uvfK8jhVS5nBhQ==", + "optional": true, + "requires": { + "@types/node-fetch": "2.5.4", + "core-js": "^3.0.1", + "node-fetch": "^2.2.0", + "sha.js": "^2.4.11" + } + } + } + }, + "pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "optional": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + } + } + } + }, "@apollo/protobufjs": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@apollo/protobufjs/-/protobufjs-1.0.3.tgz", @@ -1254,6 +1373,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/@dsherret/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", "integrity": "sha1-H2R13IvZdM6gei2vOGSzF7HdMyw=", + "optional": true, "requires": { "is-absolute": "^1.0.0", "is-negated-glob": "^1.0.0" @@ -2058,27 +2178,29 @@ } }, "@nestjs/graphql": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/@nestjs/graphql/-/graphql-6.5.4.tgz", - "integrity": "sha512-t+l8+2SgY7u3yUDyzuffMD5728hdK9E8wX/AjCbm5PKDEMdDgNuA9pAj/UoRZNaeXYVcFazQZztMRMzHnMjHQg==", + "version": "7.0.0-next.1", + "resolved": "https://registry.npmjs.org/@nestjs/graphql/-/graphql-7.0.0-next.1.tgz", + "integrity": "sha512-Xm1G/1tfSRG1XdEiQRLu7MEJRD4WYC1YTSUQHHch5vA2ZTFqCVMxKyIbXS+Ak+y1WsZJATCiKrgAPsPoI2ZLbg==", "requires": { - "@types/graphql": "14.2.3", + "@apollo/federation": "^0.10.1", + "@apollo/gateway": "^0.10.8", "chokidar": "3.3.1", - "fast-glob": "3.1.1", - "graphql-tools": "4.0.6", + "fast-glob": "3.2.2", + "graphql-tools": "4.0.7", "iterall": "1.2.2", "lodash": "4.17.15", "merge-graphql-schemas": "1.7.6", "normalize-path": "3.0.0", - "ts-morph": "5.0.0", + "ts-morph": "^5.0.0", + "tslib": "1.10.0", "type-graphql": "^0.17.3", - "uuid": "3.3.3" + "uuid": "3.4.0" }, "dependencies": { "graphql-tools": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-4.0.6.tgz", - "integrity": "sha512-jHLQw8x3xmSNRBCsaZqelXXsFfUSUSktSCUP8KYHiX1Z9qEuwcMpAf+FkdBzk8aTAFqOlPdNZ3OI4DKKqGKUqg==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/graphql-tools/-/graphql-tools-4.0.7.tgz", + "integrity": "sha512-rApl8sT8t/W1uQRcwzxMYyUBiCl/XicluApiDkNze5TX/GR0BSTQMjM2UcRGdTmkbsb1Eqq6afkyyeG/zMxZYQ==", "requires": { "apollo-link": "^1.2.3", "apollo-utilities": "^1.0.1", @@ -2087,10 +2209,15 @@ "uuid": "^3.1.0" } }, + "tslib": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + }, "uuid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", - "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" } } }, @@ -2252,6 +2379,7 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.1.1.tgz", "integrity": "sha512-8TLlC85CXgKNoTeqoXtrscPmKDbQCBfwZJ4hqli/QI4STa7sD2H6UqI9LSg8uBV5FYaD0QSdj/mtrCDrELvF+Q==", + "optional": true, "requires": { "@dsherret/to-absolute-glob": "^2.0.2", "fs-extra": "^8.1.0", @@ -2266,6 +2394,7 @@ "version": "10.0.2", "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "optional": true, "requires": { "@types/glob": "^7.1.1", "array-union": "^2.1.0", @@ -2430,11 +2559,6 @@ "@types/node": "*" } }, - "@types/graphql": { - "version": "14.2.3", - "resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.2.3.tgz", - "integrity": "sha512-UoCovaxbJIxagCvVfalfK7YaNhmxj3BQFRQ2RHQKLiu+9wNXhJnlbspsLHt/YQM99IaLUUFJNzCwzc6W0ypMeQ==" - }, "@types/graphql-upload": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/@types/graphql-upload/-/graphql-upload-8.0.3.tgz", @@ -2454,14 +2578,12 @@ "@types/istanbul-lib-coverage": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz", - "integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==", - "dev": true + "integrity": "sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg==" }, "@types/istanbul-lib-report": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dev": true, "requires": { "@types/istanbul-lib-coverage": "*" } @@ -2470,7 +2592,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz", "integrity": "sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA==", - "dev": true, "requires": { "@types/istanbul-lib-coverage": "*", "@types/istanbul-lib-report": "*" @@ -2657,8 +2778,7 @@ "@types/yargs-parser": { "version": "15.0.0", "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-15.0.0.tgz", - "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==", - "dev": true + "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==" }, "@typescript-eslint/eslint-plugin": { "version": "2.20.0", @@ -3307,7 +3427,8 @@ "array-differ": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==" + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", + "optional": true }, "array-equal": { "version": "1.0.0", @@ -3513,7 +3634,8 @@ "arrify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==" + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", + "optional": true }, "asn1": { "version": "0.2.4", @@ -4434,7 +4556,8 @@ "code-block-writer": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-10.1.0.tgz", - "integrity": "sha512-RG9hpXtWFeUWhuUav1YuP/vGcyncW+t90yJLk9fNZs1De2OuHTHKAKThVCokt29PYq5RoJ0QSZaIZ+rvPO23hA==" + "integrity": "sha512-RG9hpXtWFeUWhuUav1YuP/vGcyncW+t90yJLk9fNZs1De2OuHTHKAKThVCokt29PYq5RoJ0QSZaIZ+rvPO23hA==", + "optional": true }, "collect-v8-coverage": { "version": "1.0.0", @@ -5890,15 +6013,23 @@ "dev": true }, "fast-glob": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.1.1.tgz", - "integrity": "sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz", + "integrity": "sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A==", "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.0", "merge2": "^1.3.0", - "micromatch": "^4.0.2" + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + }, + "dependencies": { + "picomatch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz", + "integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA==" + } } }, "fast-json-stable-stringify": { @@ -5918,11 +6049,11 @@ "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" }, "fastq": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.0.tgz", - "integrity": "sha512-jmxqQ3Z/nXoeyDmWAzF9kH1aGZSis6e/SbfPmJpUnyZ0ogr6iscHQaml4wsEepEWSdtmpy+eVXmCRIMpxaXqOA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.1.tgz", + "integrity": "sha512-mpIH5sKYueh3YyeJwqtVo8sORi0CgtmkVbK6kZStpQlZBYQuTzG2CZ7idSiJuA7bY0SFCWUc5WIs+oYumGCQNw==", "requires": { - "reusify": "^1.0.0" + "reusify": "^1.0.4" } }, "fb-watchman": { @@ -6989,6 +7120,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "optional": true, "requires": { "is-relative": "^1.0.0", "is-windows": "^1.0.1" @@ -7144,7 +7276,8 @@ "is-negated-glob": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=" + "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "optional": true }, "is-number": { "version": "7.0.0", @@ -7177,6 +7310,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "optional": true, "requires": { "is-unc-path": "^1.0.0" } @@ -7211,6 +7345,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "optional": true, "requires": { "unc-path-regex": "^0.1.2" } @@ -9152,6 +9287,12 @@ "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", "dev": true }, + "lodash.xorby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.xorby/-/lodash.xorby-4.7.0.tgz", + "integrity": "sha1-nBmm+fBjputT3QPBtocXmYAUY9c=", + "optional": true + }, "log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", @@ -9161,6 +9302,21 @@ "chalk": "^2.4.2" } }, + "loglevel": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.7.tgz", + "integrity": "sha512-cY2eLFrQSAfVPhCgH1s7JI73tMbg9YC3v3+ZHVW67sBS7UxWzNEk/ZBbSfLykBWHp33dqqtOv82gjhKEi81T/A==", + "optional": true + }, + "loglevel-debug": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/loglevel-debug/-/loglevel-debug-0.0.1.tgz", + "integrity": "sha1-ifidPboTy6iiy0YV1dOtcYn0iik=", + "optional": true, + "requires": { + "loglevel": "^1.4.0" + } + }, "lolex": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz", @@ -9524,6 +9680,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", + "optional": true, "requires": { "@types/minimatch": "^3.0.3", "array-differ": "^3.0.0", @@ -10638,8 +10795,7 @@ "react-is": { "version": "16.12.0", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", - "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==", - "dev": true + "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==" }, "read-pkg": { "version": "2.0.0", @@ -12360,6 +12516,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-5.0.0.tgz", "integrity": "sha512-VP5dFnOzmlsDkSyuGczgVNtyJdYXMxFqMO2Rb0pIeni0o0Cy/nDljETBWhJs4FI4DIWv7Ftq69kgZO8p8w6LCw==", + "optional": true, "requires": { "@dsherret/to-absolute-glob": "^2.0.2", "@ts-morph/common": "~0.1.0", @@ -12543,7 +12700,8 @@ "unc-path-regex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "optional": true }, "union-value": { "version": "1.0.1", diff --git a/sample/23-type-graphql/package.json b/sample/23-graphql-code-first/package.json similarity index 95% rename from sample/23-type-graphql/package.json rename to sample/23-graphql-code-first/package.json index 6f44b9e66..a4890fdcb 100644 --- a/sample/23-type-graphql/package.json +++ b/sample/23-graphql-code-first/package.json @@ -21,7 +21,7 @@ "dependencies": { "@nestjs/common": "6.11.7", "@nestjs/core": "6.11.7", - "@nestjs/graphql": "6.5.4", + "@nestjs/graphql": "^7.0.0-next.1", "@nestjs/platform-express": "6.11.7", "apollo-server-express": "2.10.1", "class-transformer": "0.2.3", @@ -29,8 +29,7 @@ "graphql": "14.6.0", "graphql-subscriptions": "1.1.0", "reflect-metadata": "0.1.13", - "rxjs": "6.5.4", - "type-graphql": "0.17.6" + "rxjs": "6.5.4" }, "devDependencies": { "@nestjs/cli": "6.14.2", diff --git a/integration/typegraphql/schema.gql b/sample/23-graphql-code-first/schema.gql similarity index 71% rename from integration/typegraphql/schema.gql rename to sample/23-graphql-code-first/schema.gql index 5257a02a5..48150069f 100644 --- a/integration/typegraphql/schema.gql +++ b/sample/23-graphql-code-first/schema.gql @@ -1,7 +1,6 @@ -# ----------------------------------------------- -# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!! -# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!! -# ----------------------------------------------- +# ------------------------------------------------------ +# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY) +# ------------------------------------------------------ """Date custom scalar type""" scalar Date diff --git a/sample/23-type-graphql/src/app.module.ts b/sample/23-graphql-code-first/src/app.module.ts similarity index 100% rename from sample/23-type-graphql/src/app.module.ts rename to sample/23-graphql-code-first/src/app.module.ts diff --git a/sample/23-type-graphql/src/common/scalars/date.scalar.ts b/sample/23-graphql-code-first/src/common/scalars/date.scalar.ts similarity index 100% rename from sample/23-type-graphql/src/common/scalars/date.scalar.ts rename to sample/23-graphql-code-first/src/common/scalars/date.scalar.ts diff --git a/sample/23-type-graphql/src/main.ts b/sample/23-graphql-code-first/src/main.ts similarity index 100% rename from sample/23-type-graphql/src/main.ts rename to sample/23-graphql-code-first/src/main.ts diff --git a/sample/23-type-graphql/src/recipes/dto/new-recipe.input.ts b/sample/23-graphql-code-first/src/recipes/dto/new-recipe.input.ts similarity index 85% rename from sample/23-type-graphql/src/recipes/dto/new-recipe.input.ts rename to sample/23-graphql-code-first/src/recipes/dto/new-recipe.input.ts index c20a00448..79645888c 100644 --- a/sample/23-type-graphql/src/recipes/dto/new-recipe.input.ts +++ b/sample/23-graphql-code-first/src/recipes/dto/new-recipe.input.ts @@ -1,5 +1,5 @@ +import { Field, InputType } from '@nestjs/graphql'; import { IsOptional, Length, MaxLength } from 'class-validator'; -import { Field, InputType } from 'type-graphql'; @InputType() export class NewRecipeInput { diff --git a/sample/23-type-graphql/src/recipes/dto/recipes.args.ts b/sample/23-graphql-code-first/src/recipes/dto/recipes.args.ts similarity index 78% rename from sample/23-type-graphql/src/recipes/dto/recipes.args.ts rename to sample/23-graphql-code-first/src/recipes/dto/recipes.args.ts index aae6211cb..13d1be712 100644 --- a/sample/23-type-graphql/src/recipes/dto/recipes.args.ts +++ b/sample/23-graphql-code-first/src/recipes/dto/recipes.args.ts @@ -1,5 +1,5 @@ +import { ArgsType, Field, Int } from '@nestjs/graphql'; import { Max, Min } from 'class-validator'; -import { ArgsType, Field, Int } from 'type-graphql'; @ArgsType() export class RecipesArgs { diff --git a/integration/typegraphql/src/recipes/models/recipe.ts b/sample/23-graphql-code-first/src/recipes/models/recipe.ts similarity index 81% rename from integration/typegraphql/src/recipes/models/recipe.ts rename to sample/23-graphql-code-first/src/recipes/models/recipe.ts index 461330489..337942199 100644 --- a/integration/typegraphql/src/recipes/models/recipe.ts +++ b/sample/23-graphql-code-first/src/recipes/models/recipe.ts @@ -1,4 +1,4 @@ -import { Field, ID, ObjectType } from 'type-graphql'; +import { Field, ID, ObjectType } from '@nestjs/graphql'; @ObjectType() export class Recipe { diff --git a/sample/23-type-graphql/src/recipes/recipes.module.ts b/sample/23-graphql-code-first/src/recipes/recipes.module.ts similarity index 100% rename from sample/23-type-graphql/src/recipes/recipes.module.ts rename to sample/23-graphql-code-first/src/recipes/recipes.module.ts diff --git a/sample/23-type-graphql/src/recipes/recipes.resolver.ts b/sample/23-graphql-code-first/src/recipes/recipes.resolver.ts similarity index 100% rename from sample/23-type-graphql/src/recipes/recipes.resolver.ts rename to sample/23-graphql-code-first/src/recipes/recipes.resolver.ts diff --git a/sample/23-type-graphql/src/recipes/recipes.service.ts b/sample/23-graphql-code-first/src/recipes/recipes.service.ts similarity index 100% rename from sample/23-type-graphql/src/recipes/recipes.service.ts rename to sample/23-graphql-code-first/src/recipes/recipes.service.ts diff --git a/sample/23-type-graphql/tsconfig.build.json b/sample/23-graphql-code-first/tsconfig.build.json similarity index 100% rename from sample/23-type-graphql/tsconfig.build.json rename to sample/23-graphql-code-first/tsconfig.build.json diff --git a/sample/23-type-graphql/tsconfig.json b/sample/23-graphql-code-first/tsconfig.json similarity index 100% rename from sample/23-type-graphql/tsconfig.json rename to sample/23-graphql-code-first/tsconfig.json