From dd3bc4b8849cecd50e6fd45b26913e83971d45d2 Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 5 Sep 2019 11:31:09 -0400 Subject: [PATCH 1/7] support list of files with localSchemaFile in apollo config --- package-lock.json | 99 +++++++++++++------ packages/apollo-language-server/package.json | 1 + .../src/config/config.ts | 2 +- .../src/providers/schema/file.ts | 51 ++++++++-- .../src/providers/schema/index.ts | 13 ++- 5 files changed, 121 insertions(+), 45 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7b70d9bace..dcaf860d82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3356,8 +3356,7 @@ "dependencies": { "@oclif/command": { "version": "1.5.18", - "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.5.18.tgz", - "integrity": "sha512-sfLb5UUCwyQ0w9LyQ1/3DUuD/RWnPZk6uvcK5P7pqD65WgRJaOPCqzuNZyb56kPsj6FftRp1UudApNKd7U0KBQ==", + "bundled": true, "requires": { "@oclif/config": "^1", "@oclif/errors": "^1.2.2", @@ -3369,8 +3368,7 @@ }, "@oclif/config": { "version": "1.13.3", - "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.13.3.tgz", - "integrity": "sha512-qs5XvGRw+1M41abOKCjd0uoeHCgsMxa2MurD2g2K8CtQlzlMXl0rW5idVeimIg5208LLuxkfzQo8TKAhhRCWLg==", + "bundled": true, "requires": { "@oclif/parser": "^3.8.0", "debug": "^4.1.1", @@ -3379,8 +3377,7 @@ }, "@oclif/parser": { "version": "3.8.4", - "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.4.tgz", - "integrity": "sha512-cyP1at3l42kQHZtqDS3KfTeyMvxITGwXwH1qk9ktBYvqgMp5h4vHT+cOD74ld3RqJUOZY/+Zi9lb4Tbza3BtuA==", + "bundled": true, "requires": { "@oclif/linewrap": "^1.0.0", "chalk": "^2.4.2", @@ -3389,8 +3386,7 @@ }, "@oclif/plugin-help": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-2.2.1.tgz", - "integrity": "sha512-psEA3t41MSGBErLk6xCaAq2jKrRtx3Br+kHpd43vZeGEeZ7Gos4wgK0JAaHBbvhvUQskCHg8dzoqv4XEeTWeVQ==", + "bundled": true, "requires": { "@oclif/command": "^1.5.13", "chalk": "^2.4.1", @@ -3404,8 +3400,7 @@ }, "env-ci": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/env-ci/-/env-ci-3.2.2.tgz", - "integrity": "sha512-AOiNZ3lmxrtva3r/roqaYDF+1PX2V+ouUzuGqJf7KNxyyYkuU+CsfFbbUeibQPdixxjI/lP6eDtvtkX1/wymJw==", + "bundled": true, "requires": { "execa": "^1.0.0", "java-properties": "^1.0.0" @@ -3413,8 +3408,7 @@ }, "glob": { "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "bundled": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3426,8 +3420,7 @@ }, "string-width": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "bundled": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -3451,8 +3444,7 @@ "dependencies": { "@babel/generator": { "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", - "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", + "bundled": true, "requires": { "@babel/types": "^7.5.5", "jsesc": "^2.5.1", @@ -3463,8 +3455,7 @@ }, "@babel/types": { "version": "7.6.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", - "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "bundled": true, "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -3473,8 +3464,7 @@ }, "lodash": { "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "bundled": true } } }, @@ -3492,8 +3482,7 @@ "dependencies": { "@babel/generator": { "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", - "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", + "bundled": true, "requires": { "@babel/types": "^7.5.5", "jsesc": "^2.5.1", @@ -3504,8 +3493,7 @@ }, "@babel/types": { "version": "7.6.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", - "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "bundled": true, "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -3514,8 +3502,7 @@ }, "lodash": { "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "bundled": true } } }, @@ -3553,8 +3540,7 @@ "dependencies": { "@babel/generator": { "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", - "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", + "bundled": true, "requires": { "@babel/types": "^7.5.5", "jsesc": "^2.5.1", @@ -3565,8 +3551,7 @@ }, "@babel/types": { "version": "7.6.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", - "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "bundled": true, "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -3575,8 +3560,7 @@ }, "lodash": { "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "bundled": true } } }, @@ -3630,6 +3614,57 @@ "moment": "^2.24.0", "vscode-languageserver": "^5.1.0", "vscode-uri": "1.0.6" + }, + "dependencies": { + "apollo-graphql": { + "version": "file:packages/apollo-graphql", + "bundled": true, + "requires": { + "apollo-env": "file:packages/apollo-env", + "lodash.sortby": "^4.7.0" + }, + "dependencies": { + "apollo-env": { + "version": "file:packages/apollo-env", + "bundled": true, + "requires": { + "core-js": "^3.0.1", + "node-fetch": "^2.2.0", + "sha.js": "^2.4.11" + }, + "dependencies": { + "core-js": { + "version": "3.2.1", + "bundled": true + }, + "inherits": { + "version": "2.0.4", + "bundled": true + }, + "node-fetch": { + "version": "2.6.0", + "bundled": true + }, + "safe-buffer": { + "version": "5.2.0", + "bundled": true + }, + "sha.js": { + "version": "2.4.11", + "bundled": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + } + } + }, + "lodash.sortby": { + "version": "4.7.0", + "bundled": true + } + } + } } }, "apollo-link": { diff --git a/packages/apollo-language-server/package.json b/packages/apollo-language-server/package.json index 6f8a3fc029..ba81539a7c 100644 --- a/packages/apollo-language-server/package.json +++ b/packages/apollo-language-server/package.json @@ -17,6 +17,7 @@ "npm": ">=6" }, "dependencies": { + "@apollographql/apollo-graphql": "file:../apollo-graphql", "@apollographql/apollo-tools": "file:../apollo-tools", "@apollographql/graphql-language-service-interface": "^2.0.2", "@endemolshinegroup/cosmiconfig-typescript-loader": "^1.0.0", diff --git a/packages/apollo-language-server/src/config/config.ts b/packages/apollo-language-server/src/config/config.ts index 062d03230e..479bc9756b 100644 --- a/packages/apollo-language-server/src/config/config.ts +++ b/packages/apollo-language-server/src/config/config.ts @@ -28,7 +28,7 @@ export interface RemoteServiceConfig { export interface LocalServiceConfig { name: ServiceID; - localSchemaFile: string; + localSchemaFile: string | string[]; } export interface EngineConfig { diff --git a/packages/apollo-language-server/src/providers/schema/file.ts b/packages/apollo-language-server/src/providers/schema/file.ts index 6832409008..0f170ece85 100644 --- a/packages/apollo-language-server/src/providers/schema/file.ts +++ b/packages/apollo-language-server/src/providers/schema/file.ts @@ -1,12 +1,21 @@ // FileSchemaProvider (FileProvider (SDL || IntrospectionResult) => schema) -import { GraphQLSchema, buildClientSchema, Source, buildSchema } from "graphql"; +import { + GraphQLSchema, + buildClientSchema, + Source, + buildSchema, + printSchema, + parse +} from "graphql"; import { readFileSync } from "fs"; import { extname, resolve } from "path"; import { GraphQLSchemaProvider, SchemaChangeUnsubscribeHandler } from "./base"; import { NotificationHandler } from "vscode-languageserver"; +import { buildSchemaFromSDL } from "apollo-graphql"; export interface FileSchemaProviderConfig { - path: string; + path?: string; + paths?: string[]; } // XXX file subscription export class FileSchemaProvider implements GraphQLSchemaProvider { @@ -16,7 +25,30 @@ export class FileSchemaProvider implements GraphQLSchemaProvider { async resolveSchema() { if (this.schema) return this.schema; - const { path } = this.config; + const { path, paths } = this.config; + + // load each path and get sdl string from each, if a list, concatenate them all + const documents = path + ? [this.loadFileAndGetDocument(path)] + : paths + ? paths.map(this.loadFileAndGetDocument) + : undefined; + + if (!documents) + throw new Error( + `Schema could not be loaded for [${ + path ? path : paths ? paths.join(", ") : "undefined" + }]` + ); + + this.schema = buildSchemaFromSDL(documents); + + if (!this.schema) throw new Error(`Schema could not be loaded for ${path}`); + return this.schema; + } + + // load a graphql file or introspection result and return the GraphQL DocumentNode + loadFileAndGetDocument(path: string) { let result; try { result = readFileSync(path, { @@ -28,7 +60,7 @@ export class FileSchemaProvider implements GraphQLSchemaProvider { const ext = extname(path); - // an actual introspectionQuery result + // an actual introspectionQuery result, convert to DocumentNode if (ext === ".json") { const parsed = JSON.parse(result); const __schema = parsed.data @@ -37,13 +69,14 @@ export class FileSchemaProvider implements GraphQLSchemaProvider { ? parsed.__schema : parsed; - this.schema = buildClientSchema({ __schema }); + const schema = buildClientSchema({ __schema }); + return parse(printSchema(schema)); } else if (ext === ".graphql" || ext === ".graphqls" || ext === ".gql") { - const uri = `file://${resolve(path)}`; - this.schema = buildSchema(new Source(result, uri)); + return parse(result); } - if (!this.schema) throw new Error(`Schema could not be loaded for ${path}`); - return this.schema; + throw new Error( + "File Type not supported for schema loading. Must be a .json, .graphql, .gql, or .graphqls file" + ); } onSchemaChange( diff --git a/packages/apollo-language-server/src/providers/schema/index.ts b/packages/apollo-language-server/src/providers/schema/index.ts index 084fcfc56d..662397c166 100644 --- a/packages/apollo-language-server/src/providers/schema/index.ts +++ b/packages/apollo-language-server/src/providers/schema/index.ts @@ -42,9 +42,16 @@ export function schemaProviderFromConfig( if (config.client.service) { if (isLocalServiceConfig(config.client.service)) { - return new FileSchemaProvider({ - path: config.client.service.localSchemaFile - }); + const isListOfSchemaFiles = Array.isArray( + config.client.service.localSchemaFile + ); + return new FileSchemaProvider( + isListOfSchemaFiles + ? { paths: config.client.service.localSchemaFile as string[] } + : { + path: config.client.service.localSchemaFile as string + } + ); } return new IntrospectionSchemaProvider(config.client.service); From 2814f188e1bd32bccf45b3b3bd7e4ea82248e879 Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 5 Sep 2019 13:17:36 -0400 Subject: [PATCH 2/7] Allow multiple schema files in CLI commands Affected commands: - cilent:codegen - service:check - service:push --- packages/apollo/src/commands/client/codegen.ts | 3 ++- packages/apollo/src/commands/service/check.ts | 3 ++- packages/apollo/src/commands/service/push.ts | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/apollo/src/commands/client/codegen.ts b/packages/apollo/src/commands/client/codegen.ts index 2f2137af52..d36379278e 100644 --- a/packages/apollo/src/commands/client/codegen.ts +++ b/packages/apollo/src/commands/client/codegen.ts @@ -41,7 +41,8 @@ export default class Generate extends ClientCommand { }), localSchemaFile: flags.string({ description: - "Path to your local GraphQL schema file (introspection result or SDL)" + "Path to your local GraphQL schema file (introspection result or SDL)", + multiple: true }), addTypename: flags.boolean({ description: diff --git a/packages/apollo/src/commands/service/check.ts b/packages/apollo/src/commands/service/check.ts index 7a462614a4..0409da96ae 100644 --- a/packages/apollo/src/commands/service/check.ts +++ b/packages/apollo/src/commands/service/check.ts @@ -287,7 +287,8 @@ export default class ServiceCheck extends ProjectCommand { }), localSchemaFile: flags.string({ description: - "Path to your local GraphQL schema file (introspection result or SDL)" + "Path to your local GraphQL schema file (introspection result or SDL)", + multiple: true }), markdown: flags.boolean({ description: "Output result in markdown.", diff --git a/packages/apollo/src/commands/service/push.ts b/packages/apollo/src/commands/service/push.ts index e31c1b7cc5..c55074713b 100644 --- a/packages/apollo/src/commands/service/push.ts +++ b/packages/apollo/src/commands/service/push.ts @@ -19,7 +19,8 @@ export default class ServicePush extends ProjectCommand { }), localSchemaFile: flags.string({ description: - "Path to your local GraphQL schema file (introspection result or SDL)" + "Path to your local GraphQL schema file (introspection result or SDL)", + multiple: true }), federated: flags.boolean({ char: "f", From d6837ba3e27e073c7b0996c4f90cdee5b5aab10b Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 12 Sep 2019 10:54:18 -0400 Subject: [PATCH 3/7] update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f562a9fd09..6aa87186d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## Upcoming - `apollo` - - + - Support multiple `localSchemaFile`s [#1500](https://github.com/apollographql/apollo-tooling/pull/1500) - `apollo-codegen-core` - Replace instanceof checks with their respective predicates [#1518](https://github.com/apollographql/apollo-tooling/pull/1518) - `apollo-codegen-flow` @@ -21,6 +21,7 @@ - - `apollo-language-server` - Replace instanceof checks with their respective predicates [#1518](https://github.com/apollographql/apollo-tooling/pull/1518) + - Support multiple `localSchemaFile`s [#1500](https://github.com/apollographql/apollo-tooling/pull/1500) - `apollo-tools` - - `vscode-apollo` From f06b97111f24de514704a1f1a21f6828c8b9c5ea Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 12 Sep 2019 11:26:36 -0400 Subject: [PATCH 4/7] update package --- package-lock.json | 52 +------------------- packages/apollo-language-server/package.json | 2 +- 2 files changed, 2 insertions(+), 52 deletions(-) diff --git a/package-lock.json b/package-lock.json index dcaf860d82..c79ad21b3e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3596,6 +3596,7 @@ "@endemolshinegroup/cosmiconfig-typescript-loader": "^1.0.0", "apollo-datasource": "^0.6.0", "apollo-env": "file:packages/apollo-env", + "apollo-graphql": "file:packages/apollo-graphql", "apollo-link": "^1.2.3", "apollo-link-context": "^1.0.9", "apollo-link-error": "^1.1.1", @@ -3614,57 +3615,6 @@ "moment": "^2.24.0", "vscode-languageserver": "^5.1.0", "vscode-uri": "1.0.6" - }, - "dependencies": { - "apollo-graphql": { - "version": "file:packages/apollo-graphql", - "bundled": true, - "requires": { - "apollo-env": "file:packages/apollo-env", - "lodash.sortby": "^4.7.0" - }, - "dependencies": { - "apollo-env": { - "version": "file:packages/apollo-env", - "bundled": true, - "requires": { - "core-js": "^3.0.1", - "node-fetch": "^2.2.0", - "sha.js": "^2.4.11" - }, - "dependencies": { - "core-js": { - "version": "3.2.1", - "bundled": true - }, - "inherits": { - "version": "2.0.4", - "bundled": true - }, - "node-fetch": { - "version": "2.6.0", - "bundled": true - }, - "safe-buffer": { - "version": "5.2.0", - "bundled": true - }, - "sha.js": { - "version": "2.4.11", - "bundled": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - } - } - }, - "lodash.sortby": { - "version": "4.7.0", - "bundled": true - } - } - } } }, "apollo-link": { diff --git a/packages/apollo-language-server/package.json b/packages/apollo-language-server/package.json index ba81539a7c..5c68ecaec6 100644 --- a/packages/apollo-language-server/package.json +++ b/packages/apollo-language-server/package.json @@ -17,12 +17,12 @@ "npm": ">=6" }, "dependencies": { - "@apollographql/apollo-graphql": "file:../apollo-graphql", "@apollographql/apollo-tools": "file:../apollo-tools", "@apollographql/graphql-language-service-interface": "^2.0.2", "@endemolshinegroup/cosmiconfig-typescript-loader": "^1.0.0", "apollo-datasource": "^0.6.0", "apollo-env": "file:../apollo-env", + "apollo-graphql": "file:../apollo-graphql", "apollo-link": "^1.2.3", "apollo-link-context": "^1.0.9", "apollo-link-error": "^1.1.1", From 0d8dd8b687087f964a3c9d70081456f0b030a42c Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 12 Sep 2019 11:39:50 -0400 Subject: [PATCH 5/7] update package-lock --- package-lock.json | 49 +++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index c79ad21b3e..7b70d9bace 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3356,7 +3356,8 @@ "dependencies": { "@oclif/command": { "version": "1.5.18", - "bundled": true, + "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.5.18.tgz", + "integrity": "sha512-sfLb5UUCwyQ0w9LyQ1/3DUuD/RWnPZk6uvcK5P7pqD65WgRJaOPCqzuNZyb56kPsj6FftRp1UudApNKd7U0KBQ==", "requires": { "@oclif/config": "^1", "@oclif/errors": "^1.2.2", @@ -3368,7 +3369,8 @@ }, "@oclif/config": { "version": "1.13.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.13.3.tgz", + "integrity": "sha512-qs5XvGRw+1M41abOKCjd0uoeHCgsMxa2MurD2g2K8CtQlzlMXl0rW5idVeimIg5208LLuxkfzQo8TKAhhRCWLg==", "requires": { "@oclif/parser": "^3.8.0", "debug": "^4.1.1", @@ -3377,7 +3379,8 @@ }, "@oclif/parser": { "version": "3.8.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.4.tgz", + "integrity": "sha512-cyP1at3l42kQHZtqDS3KfTeyMvxITGwXwH1qk9ktBYvqgMp5h4vHT+cOD74ld3RqJUOZY/+Zi9lb4Tbza3BtuA==", "requires": { "@oclif/linewrap": "^1.0.0", "chalk": "^2.4.2", @@ -3386,7 +3389,8 @@ }, "@oclif/plugin-help": { "version": "2.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-2.2.1.tgz", + "integrity": "sha512-psEA3t41MSGBErLk6xCaAq2jKrRtx3Br+kHpd43vZeGEeZ7Gos4wgK0JAaHBbvhvUQskCHg8dzoqv4XEeTWeVQ==", "requires": { "@oclif/command": "^1.5.13", "chalk": "^2.4.1", @@ -3400,7 +3404,8 @@ }, "env-ci": { "version": "3.2.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/env-ci/-/env-ci-3.2.2.tgz", + "integrity": "sha512-AOiNZ3lmxrtva3r/roqaYDF+1PX2V+ouUzuGqJf7KNxyyYkuU+CsfFbbUeibQPdixxjI/lP6eDtvtkX1/wymJw==", "requires": { "execa": "^1.0.0", "java-properties": "^1.0.0" @@ -3408,7 +3413,8 @@ }, "glob": { "version": "7.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3420,7 +3426,8 @@ }, "string-width": { "version": "3.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -3444,7 +3451,8 @@ "dependencies": { "@babel/generator": { "version": "7.5.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", + "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", "requires": { "@babel/types": "^7.5.5", "jsesc": "^2.5.1", @@ -3455,7 +3463,8 @@ }, "@babel/types": { "version": "7.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -3464,7 +3473,8 @@ }, "lodash": { "version": "4.17.15", - "bundled": true + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" } } }, @@ -3482,7 +3492,8 @@ "dependencies": { "@babel/generator": { "version": "7.5.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", + "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", "requires": { "@babel/types": "^7.5.5", "jsesc": "^2.5.1", @@ -3493,7 +3504,8 @@ }, "@babel/types": { "version": "7.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -3502,7 +3514,8 @@ }, "lodash": { "version": "4.17.15", - "bundled": true + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" } } }, @@ -3540,7 +3553,8 @@ "dependencies": { "@babel/generator": { "version": "7.5.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", + "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", "requires": { "@babel/types": "^7.5.5", "jsesc": "^2.5.1", @@ -3551,7 +3565,8 @@ }, "@babel/types": { "version": "7.6.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", + "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -3560,7 +3575,8 @@ }, "lodash": { "version": "4.17.15", - "bundled": true + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" } } }, @@ -3596,7 +3612,6 @@ "@endemolshinegroup/cosmiconfig-typescript-loader": "^1.0.0", "apollo-datasource": "^0.6.0", "apollo-env": "file:packages/apollo-env", - "apollo-graphql": "file:packages/apollo-graphql", "apollo-link": "^1.2.3", "apollo-link-context": "^1.0.9", "apollo-link-error": "^1.1.1", From 2c19bbebdb9f477c93c2ea2f1689b03e66ce5bb9 Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 12 Sep 2019 12:08:29 -0400 Subject: [PATCH 6/7] update tsconfig --- package-lock.json | 49 +++++++------------ packages/apollo-language-server/tsconfig.json | 2 +- 2 files changed, 18 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7b70d9bace..c79ad21b3e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3356,8 +3356,7 @@ "dependencies": { "@oclif/command": { "version": "1.5.18", - "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.5.18.tgz", - "integrity": "sha512-sfLb5UUCwyQ0w9LyQ1/3DUuD/RWnPZk6uvcK5P7pqD65WgRJaOPCqzuNZyb56kPsj6FftRp1UudApNKd7U0KBQ==", + "bundled": true, "requires": { "@oclif/config": "^1", "@oclif/errors": "^1.2.2", @@ -3369,8 +3368,7 @@ }, "@oclif/config": { "version": "1.13.3", - "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.13.3.tgz", - "integrity": "sha512-qs5XvGRw+1M41abOKCjd0uoeHCgsMxa2MurD2g2K8CtQlzlMXl0rW5idVeimIg5208LLuxkfzQo8TKAhhRCWLg==", + "bundled": true, "requires": { "@oclif/parser": "^3.8.0", "debug": "^4.1.1", @@ -3379,8 +3377,7 @@ }, "@oclif/parser": { "version": "3.8.4", - "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.4.tgz", - "integrity": "sha512-cyP1at3l42kQHZtqDS3KfTeyMvxITGwXwH1qk9ktBYvqgMp5h4vHT+cOD74ld3RqJUOZY/+Zi9lb4Tbza3BtuA==", + "bundled": true, "requires": { "@oclif/linewrap": "^1.0.0", "chalk": "^2.4.2", @@ -3389,8 +3386,7 @@ }, "@oclif/plugin-help": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-2.2.1.tgz", - "integrity": "sha512-psEA3t41MSGBErLk6xCaAq2jKrRtx3Br+kHpd43vZeGEeZ7Gos4wgK0JAaHBbvhvUQskCHg8dzoqv4XEeTWeVQ==", + "bundled": true, "requires": { "@oclif/command": "^1.5.13", "chalk": "^2.4.1", @@ -3404,8 +3400,7 @@ }, "env-ci": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/env-ci/-/env-ci-3.2.2.tgz", - "integrity": "sha512-AOiNZ3lmxrtva3r/roqaYDF+1PX2V+ouUzuGqJf7KNxyyYkuU+CsfFbbUeibQPdixxjI/lP6eDtvtkX1/wymJw==", + "bundled": true, "requires": { "execa": "^1.0.0", "java-properties": "^1.0.0" @@ -3413,8 +3408,7 @@ }, "glob": { "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "bundled": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3426,8 +3420,7 @@ }, "string-width": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "bundled": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -3451,8 +3444,7 @@ "dependencies": { "@babel/generator": { "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", - "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", + "bundled": true, "requires": { "@babel/types": "^7.5.5", "jsesc": "^2.5.1", @@ -3463,8 +3455,7 @@ }, "@babel/types": { "version": "7.6.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", - "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "bundled": true, "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -3473,8 +3464,7 @@ }, "lodash": { "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "bundled": true } } }, @@ -3492,8 +3482,7 @@ "dependencies": { "@babel/generator": { "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", - "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", + "bundled": true, "requires": { "@babel/types": "^7.5.5", "jsesc": "^2.5.1", @@ -3504,8 +3493,7 @@ }, "@babel/types": { "version": "7.6.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", - "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "bundled": true, "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -3514,8 +3502,7 @@ }, "lodash": { "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "bundled": true } } }, @@ -3553,8 +3540,7 @@ "dependencies": { "@babel/generator": { "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz", - "integrity": "sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ==", + "bundled": true, "requires": { "@babel/types": "^7.5.5", "jsesc": "^2.5.1", @@ -3565,8 +3551,7 @@ }, "@babel/types": { "version": "7.6.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.6.1.tgz", - "integrity": "sha512-X7gdiuaCmA0uRjCmRtYJNAVCc/q+5xSgsfKJHqMN4iNLILX39677fJE1O40arPMh0TTtS9ItH67yre6c7k6t0g==", + "bundled": true, "requires": { "esutils": "^2.0.2", "lodash": "^4.17.13", @@ -3575,8 +3560,7 @@ }, "lodash": { "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "bundled": true } } }, @@ -3612,6 +3596,7 @@ "@endemolshinegroup/cosmiconfig-typescript-loader": "^1.0.0", "apollo-datasource": "^0.6.0", "apollo-env": "file:packages/apollo-env", + "apollo-graphql": "file:packages/apollo-graphql", "apollo-link": "^1.2.3", "apollo-link-context": "^1.0.9", "apollo-link-error": "^1.1.1", diff --git a/packages/apollo-language-server/tsconfig.json b/packages/apollo-language-server/tsconfig.json index c441e28bc3..ab6441673b 100644 --- a/packages/apollo-language-server/tsconfig.json +++ b/packages/apollo-language-server/tsconfig.json @@ -6,5 +6,5 @@ }, "include": ["./src/**/*"], "exclude": ["**/__tests__/*", "**/__mocks__/*"], - "references": [{ "path": "../apollo-tools" }] + "references": [{ "path": "../apollo-tools" }, { "path": "../apollo-graphql" }] } From 64bf041d8384cf75e259ba346099070cf95f2760 Mon Sep 17 00:00:00 2001 From: Jake Date: Thu, 12 Sep 2019 12:24:33 -0400 Subject: [PATCH 7/7] rebuild