diff --git a/package-lock.json b/package-lock.json index da25856039..a323bfbdee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,37 +56,6 @@ "apollo-env": "file:packages/apollo-env" } }, - "@apollographql/graphql-language-service-interface": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@apollographql/graphql-language-service-interface/-/graphql-language-service-interface-2.0.2.tgz", - "integrity": "sha512-28wePK0hlIVjgmvMXMAUq8qRSjz9O+6lqFp4PzOTHtfJfSsjVe9EfjF98zTpHsTgT3HcOxmbqDZZy8jlXtOqEA==", - "requires": { - "@apollographql/graphql-language-service-parser": "^2.0.0", - "@apollographql/graphql-language-service-types": "^2.0.0", - "@apollographql/graphql-language-service-utils": "^2.0.2" - } - }, - "@apollographql/graphql-language-service-parser": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@apollographql/graphql-language-service-parser/-/graphql-language-service-parser-2.0.2.tgz", - "integrity": "sha512-rpTPrEJu1PMaRQxz5P8BZWsixNNhYloS0H0dwTxNBuE3qctbARvR7o8UCKLsmKgTbo+cz3T3a6IAsWlkHgMWGg==", - "requires": { - "@apollographql/graphql-language-service-types": "^2.0.0" - } - }, - "@apollographql/graphql-language-service-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@apollographql/graphql-language-service-types/-/graphql-language-service-types-2.0.2.tgz", - "integrity": "sha512-vE+Dz8pG+Xa1Z2nMl82LoO66lQ6JqBUjaXqLDvS3eMjvA3N4hf+YUDOWfPdNZ0zjhHhHXzUIIZCkax6bXfFbzQ==" - }, - "@apollographql/graphql-language-service-utils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@apollographql/graphql-language-service-utils/-/graphql-language-service-utils-2.0.2.tgz", - "integrity": "sha512-fDj5rWlTi/czvUS5t7V7I45Ai6bOO3Z7JARYj21Y2xxfbRGtJi6h8FvLX0N/EbzQgo/fiZc/HAhtfwn+OCjD7A==", - "requires": { - "@apollographql/graphql-language-service-types": "^2.0.0" - } - }, "@babel/code-frame": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", @@ -4561,7 +4530,6 @@ "requires": { "@apollo/federation": "0.19.1", "@apollographql/apollo-tools": "file:packages/apollo-tools", - "@apollographql/graphql-language-service-interface": "^2.0.2", "@endemolshinegroup/cosmiconfig-typescript-loader": "^1.0.0", "apollo-datasource": "^0.7.0", "apollo-env": "file:packages/apollo-env", @@ -4577,6 +4545,7 @@ "dotenv": "^8.0.0", "glob": "^7.1.3", "graphql": "14.0.2 - 14.2.0 || ^14.3.1 || ^15.0.0", + "graphql-language-service-interface": "^2.4.1", "graphql-tag": "^2.10.1", "lodash.debounce": "^4.0.8", "lodash.merge": "^4.6.1", @@ -8757,6 +8726,42 @@ "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.2.0.tgz", "integrity": "sha512-tsceRyHfgzZo+ee0YK3o8f0CR0cXAXxRlxoORWFo/CoM1bVy3UXGWeyzBcf+Y6oqPvO27BDmOEVATcunOO/MrQ==" }, + "graphql-language-service-interface": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/graphql-language-service-interface/-/graphql-language-service-interface-2.4.1.tgz", + "integrity": "sha512-cKT0ia7xNVpkLlI0vuwxVpPVIXwy02ah4I+N6s4mxFKVgo+lPlX9r933EWX6t1P1vzGJmNf+dip2dK3gHg2bBw==", + "requires": { + "graphql-language-service-parser": "^1.6.1", + "graphql-language-service-types": "^1.6.1", + "graphql-language-service-utils": "^2.4.1", + "vscode-languageserver-types": "^3.15.1" + }, + "dependencies": { + "vscode-languageserver-types": { + "version": "3.15.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.1.tgz", + "integrity": "sha512-+a9MPUQrNGRrGU630OGbYVQ+11iOIovjCkqxajPa9w57Sd5ruK8WQNsslzpa0x/QJqC8kRc2DUxWjIFwoNm4ZQ==" + } + } + }, + "graphql-language-service-parser": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/graphql-language-service-parser/-/graphql-language-service-parser-1.6.2.tgz", + "integrity": "sha512-7CwFkvuOjyrzwk+Ox4hPH839NOGnFHbzlWD08nsRxRTqth71LkHWS1ADVFxvBv49C1kXFmLSsCMhi4PH1meozQ==" + }, + "graphql-language-service-types": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/graphql-language-service-types/-/graphql-language-service-types-1.6.1.tgz", + "integrity": "sha512-ag3m5b7aje7ZBSuLVQE/gt2iDL9WEfzotZfLyskUDOonhHKniQ8BfmSQ/pF9F6zrdVjtZ8VRr5nes1sEYvvwKQ==" + }, + "graphql-language-service-utils": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/graphql-language-service-utils/-/graphql-language-service-utils-2.4.1.tgz", + "integrity": "sha512-fqYSrjJ3YXHwY9eYUz5nesLwLfo8csbR/hS4Xz8wDZCeqkD20UzjVfnbF1Q0SjtKFlDtEfnG9hJvHZEJXZCF3A==", + "requires": { + "graphql-language-service-types": "^1.6.1" + } + }, "graphql-tag": { "version": "2.10.1", "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.10.1.tgz", diff --git a/packages/apollo-language-server/package.json b/packages/apollo-language-server/package.json index 5f0d629789..a1456f62a0 100644 --- a/packages/apollo-language-server/package.json +++ b/packages/apollo-language-server/package.json @@ -19,7 +19,7 @@ "dependencies": { "@apollo/federation": "0.19.1", "@apollographql/apollo-tools": "file:../apollo-tools", - "@apollographql/graphql-language-service-interface": "^2.0.2", + "graphql-language-service-interface": "^2.4.1", "@endemolshinegroup/cosmiconfig-typescript-loader": "^1.0.0", "apollo-datasource": "^0.7.0", "apollo-env": "file:../apollo-env", diff --git a/packages/apollo-language-server/src/document.ts b/packages/apollo-language-server/src/document.ts index 100f311ec1..20e595a9fd 100644 --- a/packages/apollo-language-server/src/document.ts +++ b/packages/apollo-language-server/src/document.ts @@ -8,7 +8,7 @@ import { DiagnosticSeverity } from "vscode-languageserver"; -import { getRange as rangeOfTokenAtLocation } from "@apollographql/graphql-language-service-interface/dist/getDiagnostics"; +import { getRange as rangeOfTokenAtLocation } from "graphql-language-service-interface/dist/getDiagnostics"; import { positionFromSourceLocation, diff --git a/packages/apollo-language-server/src/languageProvider.ts b/packages/apollo-language-server/src/languageProvider.ts index 0ada900b0b..11f6b6711f 100644 --- a/packages/apollo-language-server/src/languageProvider.ts +++ b/packages/apollo-language-server/src/languageProvider.ts @@ -19,11 +19,11 @@ import { } from "vscode-languageserver"; // should eventually be moved into this package, since we're overriding a lot of the existing behavior here -import { getAutocompleteSuggestions } from "@apollographql/graphql-language-service-interface"; +import { getAutocompleteSuggestions } from "graphql-language-service-interface"; import { getTokenAtPosition, getTypeInfo -} from "@apollographql/graphql-language-service-interface/dist/getAutocompleteSuggestions"; +} from "graphql-language-service-interface/dist/getAutocompleteSuggestions"; import { GraphQLWorkspace } from "./workspace"; import { DocumentUri } from "./project/base"; diff --git a/packages/apollo-language-server/src/typings/graphql-language-service.d.ts b/packages/apollo-language-server/src/typings/graphql-language-service.d.ts deleted file mode 100644 index 0af282ecbd..0000000000 --- a/packages/apollo-language-server/src/typings/graphql-language-service.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -declare module "@apollographql/graphql-language-service-interface" { - import { DocumentNode, GraphQLSchema, Location } from "graphql"; - import { - Diagnostic, - Position, - Range, - CompletionItem - } from "vscode-languageserver"; - - function getAutocompleteSuggestions( - schema: GraphQLSchema, - queryText: string, - position: Position - ): CompletionItem[]; -} - -declare module "@apollographql/graphql-language-service-interface/dist/getAutocompleteSuggestions"; - -declare module "@apollographql/graphql-language-service-interface/dist/getDiagnostics" { - import { Location } from "graphql"; - import { Range } from "vscode-languageserver"; - - function getRange(location: Location, queryText: string): Range; -}