From 279c3278c2df2302ce5bc23af6a3efc7187bea40 Mon Sep 17 00:00:00 2001 From: Rikki Schulte Date: Tue, 14 Apr 2020 18:26:48 -0400 Subject: [PATCH] feat: typings, new languageservice, schema loading Co-authored-by: Rikki Schulte --- .eslintignore | 2 + .github/ISSUE_TEMPLATE/Bug_Report.md | 43 - examples/graphiql-webpack/package.json | 8 +- .../babel.config.js | 0 .../package.json | 20 +- .../monaco-graphql-webpack/src/index.html.ejs | 34 + .../src/index.ts | 78 +- .../tsconfig.json | 2 +- .../webpack.config.js | 5 +- examples/monaco-webpack/src/index.html.ejs | 33 - package.json | 2 +- .../graphiql/src/components/QueryHistory.tsx | 2 +- packages/graphiql/tsconfig.esm.json | 4 +- packages/graphiql/tsconfig.json | 4 +- .../src/GraphQLLanguageService.ts | 44 +- .../__tests__/GraphQLLanguageService-test.ts | 2 +- .../src/__tests__/getDiagnostics-test.ts | 1 + .../__tests__/queries/definitionQuery.graphql | 1 + .../src/__tests__/queries/testQuery.graphql | 0 .../src/getAutocompleteSuggestions.ts | 2 - .../src/getDiagnostics.ts | 48 +- .../src/index.ts | 11 +- .../tsconfig.esm.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.esm.json | 2 +- .../tsconfig.json | 2 +- .../src/GraphQLCache.ts | 7 +- .../src/MessageProcessor.ts | 8 +- .../src/__tests__/.graphqlrc.yml | 17 +- .../src/__tests__/GraphQLCache-test.ts | 0 .../src/__tests__/MessageProcessor-test.ts | 2 +- .../src/__tests__/__queries__/test2.graphql | 0 .../__queries__/testFragment.graphql | 0 .../src/findGraphQLTags.ts | 0 .../src/index.ts | 5 + .../src/parseDocument.ts | 0 .../src/startServer.ts | 2 +- .../src/stringToHash.ts | 0 .../tsconfig.esm.json | 7 +- .../tsconfig.json | 7 +- .../tsconfig.esm.json | 2 +- .../tsconfig.json | 2 +- .../tsconfig.esm.json | 2 +- .../tsconfig.json | 2 +- packages/graphql-language-service/.npmignore | 3 + .../graphql-language-service/src/client.ts | 7 +- .../graphql-language-service/tsconfig.json | 11 +- packages/graphql-languageservice/package.json | 2 +- .../src/LanguageService.ts | 81 + packages/graphql-languageservice/src/index.ts | 2 +- .../graphql-languageservice/tsconfig.esm.json | 9 +- .../graphql-languageservice/tsconfig.json | 9 +- packages/monaco-graphql/package.json | 15 +- packages/monaco-graphql/src/BrowserLoader.ts | 50 - packages/monaco-graphql/src/defaults.ts | 85 + packages/monaco-graphql/src/graphql.worker.ts | 140 +- packages/monaco-graphql/src/graphqlMode.ts | 47 +- packages/monaco-graphql/src/graphqlWorker.ts | 226 - .../monaco-graphql/src/languageFeatures.ts | 114 +- .../monaco-graphql/src/monaco.contribution.ts | 104 +- packages/monaco-graphql/src/schema.ts | 5030 ----------------- .../src/{ => typings}/monaco.d.ts | 21 +- packages/monaco-graphql/src/typings/refs.d.ts | 3 +- packages/monaco-graphql/src/utils.ts | 122 +- packages/monaco-graphql/src/workerManager.ts | 10 +- packages/monaco-graphql/tsconfig.esm.json | 5 +- packages/monaco-graphql/tsconfig.json | 5 +- resources/pretty.js | 2 +- resources/tsconfig.base.cjs.json | 1 + yarn.lock | 498 +- 70 files changed, 681 insertions(+), 6338 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/Bug_Report.md rename examples/{monaco-webpack => monaco-graphql-webpack}/babel.config.js (100%) rename examples/{monaco-webpack => monaco-graphql-webpack}/package.json (63%) create mode 100644 examples/monaco-graphql-webpack/src/index.html.ejs rename examples/{monaco-webpack => monaco-graphql-webpack}/src/index.ts (69%) rename examples/{monaco-webpack => monaco-graphql-webpack}/tsconfig.json (86%) rename examples/{monaco-webpack => monaco-graphql-webpack}/webpack.config.js (94%) delete mode 100644 examples/monaco-webpack/src/index.html.ejs create mode 100644 packages/graphql-language-service-interface/src/__tests__/queries/definitionQuery.graphql create mode 100644 packages/graphql-language-service-interface/src/__tests__/queries/testQuery.graphql rename packages/{graphql-language-service-interface => graphql-language-service-server}/src/GraphQLCache.ts (99%) rename packages/{graphql-language-service-interface => graphql-language-service-server}/src/__tests__/GraphQLCache-test.ts (100%) create mode 100644 packages/graphql-language-service-server/src/__tests__/__queries__/test2.graphql rename packages/{graphql-language-service-interface => graphql-language-service-server}/src/__tests__/__queries__/testFragment.graphql (100%) rename packages/{graphql-language-service-interface => graphql-language-service-server}/src/findGraphQLTags.ts (100%) rename packages/{graphql-language-service-interface => graphql-language-service-server}/src/parseDocument.ts (100%) rename packages/{graphql-language-service-interface => graphql-language-service-server}/src/stringToHash.ts (100%) create mode 100644 packages/graphql-language-service/.npmignore create mode 100644 packages/graphql-languageservice/src/LanguageService.ts delete mode 100644 packages/monaco-graphql/src/BrowserLoader.ts create mode 100644 packages/monaco-graphql/src/defaults.ts delete mode 100644 packages/monaco-graphql/src/graphqlWorker.ts delete mode 100644 packages/monaco-graphql/src/schema.ts rename packages/monaco-graphql/src/{ => typings}/monaco.d.ts (88%) diff --git a/.eslintignore b/.eslintignore index 9a6b21acb3f..6b8be74af66 100644 --- a/.eslintignore +++ b/.eslintignore @@ -28,9 +28,11 @@ **/flow-typed **/dist **/esm +**/bundle packages/graphiql/webpack packages/graphiql/storybook packages/graphiql/lsp +packages/graphiql/monaco packages/graphiql/*.html **/renderExample.js **/*.min.js diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.md b/.github/ISSUE_TEMPLATE/Bug_Report.md deleted file mode 100644 index 8e6dfc11ed7..00000000000 --- a/.github/ISSUE_TEMPLATE/Bug_Report.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: "\U0001F41B GraphiQL Bug report" -about: Create a report to help make GraphiQL better -labels: bug, needs triage -assignees: acao ---- - -## 🐛 GraphiQL Bug report - -### Current Behavior - - - -### Expected behavior - - - -### Reproducible example - - - - - -### Suggested solution(s) - - - -### Additional context - - - -### Your environment - - - -| Software | Version(s) | -| ------------------ | ---------- | -| GraphiQL | | -| React | | -| TypeScript | | -| Browser (plugins?) | | -| npm/Yarn | | -| Operating System | | diff --git a/examples/graphiql-webpack/package.json b/examples/graphiql-webpack/package.json index 79aca806425..79310292eaa 100644 --- a/examples/graphiql-webpack/package.json +++ b/examples/graphiql-webpack/package.json @@ -16,10 +16,10 @@ "react": "16.13.1" }, "devDependencies": { - "@babel/plugin-proposal-class-properties": "^7.8.3", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/preset-env": "^7.9.5", - "@babel/preset-react": "^7.9.4", + "@babel/plugin-proposal-class-properties": "7.8.3", + "@babel/plugin-syntax-dynamic-import": "7.8.3", + "@babel/preset-env": "7.9.5", + "@babel/preset-react": "7.9.4", "babel-loader": "^8.1.0", "cross-env": "^7.0.2", "css-loader": "^3.5.1", diff --git a/examples/monaco-webpack/babel.config.js b/examples/monaco-graphql-webpack/babel.config.js similarity index 100% rename from examples/monaco-webpack/babel.config.js rename to examples/monaco-graphql-webpack/babel.config.js diff --git a/examples/monaco-webpack/package.json b/examples/monaco-graphql-webpack/package.json similarity index 63% rename from examples/monaco-webpack/package.json rename to examples/monaco-graphql-webpack/package.json index fe575830242..8de3ac3f60d 100644 --- a/examples/monaco-webpack/package.json +++ b/examples/monaco-graphql-webpack/package.json @@ -1,12 +1,12 @@ { - "name": "example-monaco-webpack", + "name": "example-monaco-graphql-webpack", "version": "1.0.0-alpha.3", "private": true, "license": "MIT", - "description": "A monaco example with webpack and typescript", + "description": "A simple monaco example with webpack and typescript", "scripts": { - "build": "cross-env NODE_ENV=production webpack", - "build-demo": "yarn build", + "build": "cross-env NODE_ENV=production webpack ", + "build-demo": "yarn build && yarn copy-demo", "copy-demo": "mkdirp ../../packages/graphiql/monaco && copy 'bundle/*' '../../packages/graphiql/monaco'", "start": "cross-env NODE_ENV=development webpack-dev-server" }, @@ -16,20 +16,20 @@ "prettier": "^2.0.2" }, "devDependencies": { - "@babel/plugin-proposal-class-properties": "7.7.4", + "@babel/plugin-proposal-class-properties": "7.8.3", "@babel/plugin-syntax-dynamic-import": "7.8.3", - "@babel/preset-env": "7.9.0", + "@babel/preset-env": "7.9.5", "@types/prettier": "^2.0.0", "babel-loader": "^8.1.0", "cross-env": "^7.0.0", - "css-loader": "^3.4.2", - "html-webpack-plugin": "^4.0.1", + "css-loader": "^3.5.1", + "html-webpack-plugin": "^4.2.0", "monaco-editor": "^0.20.0", "monaco-editor-webpack-plugin": "^1.9.0", "react-dom": "^16.12.0", - "style-loader": "^1.0.1", + "style-loader": "^1.1.3", "webpack": "4.42.1", - "webpack-cli": "^3.3.10", + "webpack-cli": "^3.3.11", "webpack-dev-server": "^3.10.1", "worker-loader": "^2.0.0" } diff --git a/examples/monaco-graphql-webpack/src/index.html.ejs b/examples/monaco-graphql-webpack/src/index.html.ejs new file mode 100644 index 00000000000..d34a4facbee --- /dev/null +++ b/examples/monaco-graphql-webpack/src/index.html.ejs @@ -0,0 +1,34 @@ + + + + + + + Monaco Example! + + + + +
+
+
+
+
+
+
+ + + diff --git a/examples/monaco-webpack/src/index.ts b/examples/monaco-graphql-webpack/src/index.ts similarity index 69% rename from examples/monaco-webpack/src/index.ts rename to examples/monaco-graphql-webpack/src/index.ts index bb0d041a105..026ab95be74 100644 --- a/examples/monaco-webpack/src/index.ts +++ b/examples/monaco-graphql-webpack/src/index.ts @@ -1,8 +1,8 @@ import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js'; + import 'regenerator-runtime/runtime'; import 'monaco-graphql/esm/monaco.contribution'; -import * as prettierStandalone from 'prettier/standalone'; -import * as prettierGraphqlParser from 'prettier/parser-graphql'; + // NOTE: using loader syntax becuase Yaml worker imports editor.worker directly and that // import shouldn't go through loader syntax. // @ts-ignore @@ -13,6 +13,7 @@ import JSONWorker from 'worker-loader!monaco-editor/esm/vs/language/json/json.wo import GraphQLWorker from 'worker-loader!monaco-graphql/esm/graphql.worker'; const SCHEMA_URL = 'https://swapi-graphql.netlify.com/.netlify/functions/index'; + // @ts-ignore window.MonacoEnvironment = { getWorker(_workerId: string, label: string) { @@ -26,11 +27,30 @@ window.MonacoEnvironment = { }, }; +// const schemaInput = document.createElement('input'); +// schemaInput.type = 'text' + +// // @ts-ignore +// schemaInput.value = SCHEMA_URL + +// schemaInput.onchange = (e) => { +// e.preventDefault() +// console.log(e.target.value) +// } + +// const toolbar = document.getElementById('toolbar') +// toolbar?.appendChild(schemaInput) + +const variablesModel = monaco.editor.createModel( + `{}`, + 'json', + monaco.Uri.file('/1/variables.json'), +); + const resultsEditor = monaco.editor.create( document.getElementById('results') as HTMLElement, { - value: `{ }`, - language: 'json', + model: variablesModel, }, ); const variablesEditor = monaco.editor.create( @@ -51,7 +71,7 @@ query Example { } `, 'graphqlDev', - monaco.Uri.file('/1.graphql'), + monaco.Uri.file('/1/operation.graphql'), ); const operationEditor = monaco.editor.create( @@ -86,18 +106,14 @@ async function executeCurrentOp() { } } -const opAction = { - id: 'run', +const opAction: monaco.editor.IActionDescriptor = { + id: 'graphql-run', label: 'Run Operation', + contextMenuOrder: 0, + contextMenuGroupId: 'graphql', keybindings: [ // eslint-disable-next-line no-bitwise monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter, - // eslint-disable-next-line no-bitwise - monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S, - // eslint-disable-next-line no-bitwise - monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_R, - // eslint-disable-next-line no-bitwise - monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_Q, ], run: executeCurrentOp, }; @@ -106,26 +122,16 @@ operationEditor.addAction(opAction); variablesEditor.addAction(opAction); resultsEditor.addAction(opAction); -/** - * Basic custom formatter/language functionality example - */ - -monaco.languages.registerDocumentFormattingEditProvider('graphqlDev', { - provideDocumentFormattingEdits: ( - document: monaco.editor.ITextModel, - _options: monaco.languages.FormattingOptions, - _token: monaco.CancellationToken, - ) => { - const text = document.getValue(); - const formatted = prettierStandalone.format(text, { - parser: 'graphql', - plugins: [prettierGraphqlParser], - }); - return [ - { - range: document.getFullModelRange(), - text: formatted, - }, - ]; - }, -}); +// add your own diagnostics? why not! +// monaco.editor.setModelMarkers( +// model, +// 'graphql', +// [{ +// severity: 5, +// message: 'An example diagnostic error', +// startColumn: 2, +// startLineNumber: 4, +// endLineNumber: 4, +// endColumn: 0, +// }], +// ); diff --git a/examples/monaco-webpack/tsconfig.json b/examples/monaco-graphql-webpack/tsconfig.json similarity index 86% rename from examples/monaco-webpack/tsconfig.json rename to examples/monaco-graphql-webpack/tsconfig.json index 0a7b759e840..4c4b57d9f41 100644 --- a/examples/monaco-webpack/tsconfig.json +++ b/examples/monaco-graphql-webpack/tsconfig.json @@ -14,5 +14,5 @@ }, "references": [{ "path": "../../packages/monaco-graphql" }], "include": ["src"], - "exclude": ["**/__tests__/**", "**/build/**.*"] + "exclude": ["**/__tests__/**", "**/build/**.*", "../../node_modules"] } diff --git a/examples/monaco-webpack/webpack.config.js b/examples/monaco-graphql-webpack/webpack.config.js similarity index 94% rename from examples/monaco-webpack/webpack.config.js rename to examples/monaco-graphql-webpack/webpack.config.js index f8701a05320..b0b768554f3 100644 --- a/examples/monaco-webpack/webpack.config.js +++ b/examples/monaco-graphql-webpack/webpack.config.js @@ -15,7 +15,7 @@ const resultConfig = { entry: { app: './index.ts', 'editor.worker': 'monaco-editor/esm/vs/editor/editor.worker.js', - 'json.worker': 'monaco-editor/esm/vs/language/json/json.worker.js', + // 'json.worker': 'monaco-editor/esm/vs/language/json/json.worker.js', 'graphql.worker': 'monaco-graphql/esm/graphql.worker.js', }, context: rootPath('src'), @@ -69,9 +69,6 @@ const resultConfig = { // in order to prevent async modules for CDN builds // until we can guarantee it will work with the CDN properly // and so that graphiql.min.js can retain parity - new webpack.optimize.LimitChunkCountPlugin({ - maxChunks: 1, - }), new HtmlWebpackPlugin({ template: relPath('src/index.html.ejs'), filename: 'index.html', diff --git a/examples/monaco-webpack/src/index.html.ejs b/examples/monaco-webpack/src/index.html.ejs deleted file mode 100644 index cc27730a448..00000000000 --- a/examples/monaco-webpack/src/index.html.ejs +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - Monaco Example! - - - - - -
-
-
-
-
-
-
- - diff --git a/package.json b/package.json index 5bd77da3107..ef44801b88b 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "watch": "yarn tsc --watch", "start-graphiql": "yarn workspace graphiql dev" }, - "dependencies": { + "devDependencies": { "@babel/cli": "^7.8.4", "@babel/core": "^7.9.0", "@babel/node": "^7.8.7", diff --git a/packages/graphiql/src/components/QueryHistory.tsx b/packages/graphiql/src/components/QueryHistory.tsx index 0d77ceb514e..0fd948df678 100644 --- a/packages/graphiql/src/components/QueryHistory.tsx +++ b/packages/graphiql/src/components/QueryHistory.tsx @@ -69,7 +69,7 @@ type QueryHistoryState = { export class QueryHistory extends React.Component< QueryHistoryProps, QueryHistoryState - > { +> { historyStore: QueryStore; favoriteStore: QueryStore; diff --git a/packages/graphiql/tsconfig.esm.json b/packages/graphiql/tsconfig.esm.json index 03502d952d8..aea6efbc174 100644 --- a/packages/graphiql/tsconfig.esm.json +++ b/packages/graphiql/tsconfig.esm.json @@ -17,8 +17,6 @@ "**/*-test.ts", "**/*-test.js", "**/*.stories.js", - "**/*.stories.ts", - "esm", - "node_modules" + "**/*.stories.ts" ] } diff --git a/packages/graphiql/tsconfig.json b/packages/graphiql/tsconfig.json index 391e60f41ae..f8f990a7281 100644 --- a/packages/graphiql/tsconfig.json +++ b/packages/graphiql/tsconfig.json @@ -9,9 +9,7 @@ "target": "es5", "strictPropertyInitialization": false }, - "include": [ - "src" - ], + "include": ["src"], "exclude": [ "**/__tests__/**", "**/dist/**.*", diff --git a/packages/graphql-language-service-interface/src/GraphQLLanguageService.ts b/packages/graphql-language-service-interface/src/GraphQLLanguageService.ts index 7d49c5bcdcb..cfa062cc454 100644 --- a/packages/graphql-language-service-interface/src/GraphQLLanguageService.ts +++ b/packages/graphql-language-service-interface/src/GraphQLLanguageService.ts @@ -14,7 +14,6 @@ import { TypeDefinitionNode, NamedTypeNode, ValidationRule, - GraphQLSchema, } from 'graphql'; import { @@ -25,12 +24,9 @@ import { Position, Outline, OutlineTree, + GraphQLCache, } from 'graphql-language-service-types'; -import { ContextToken } from 'graphql-language-service-parser' - -import { GraphQLCache } from './GraphQLCache'; - import { GraphQLConfig, GraphQLProjectConfig } from 'graphql-config'; import { Hover, @@ -103,12 +99,10 @@ function getKind(tree: OutlineTree) { export class GraphQLLanguageService { _graphQLCache: GraphQLCache; _graphQLConfig: GraphQLConfig; - _project: GraphQLProjectConfig; constructor(cache: GraphQLCache) { this._graphQLCache = cache; this._graphQLConfig = cache.getGraphQLConfig(); - this._project = this._graphQLConfig.getDefault(); } getConfigForURI(uri: Uri) { @@ -118,23 +112,6 @@ export class GraphQLLanguageService { } throw Error(`No config found for uri: ${uri}`); } - public async getSchema( - projectName?: string, - queryHasExtensions?: boolean, - ): Promise { - try { - const schema = projectName - ? await this._graphQLCache.getSchema(projectName, queryHasExtensions) - : await this._graphQLConfig.getDefault().getSchema(); - return schema; - } catch (err) { - console.warn('no schema found'); - return null; - } - } - public async getProject(projectName: string) { - this._project = this._graphQLConfig.getProject(projectName); - } public async getDiagnostics( query: string, @@ -198,7 +175,7 @@ export class GraphQLLanguageService { ); const dependenciesSource = fragmentDependencies.reduce( - (prev: any, cur: any) => `${prev} ${print(cur.definition)}`, + (prev, cur) => `${prev} ${print(cur.definition)}`, '', ); @@ -244,17 +221,12 @@ export class GraphQLLanguageService { query: string, position: Position, filePath: Uri, - contextToken?: ContextToken, ): Promise> { const projectConfig = this.getConfigForURI(filePath); -<<<<<<< HEAD const schema = await this._graphQLCache.getSchema(projectConfig.name); -======= - const schema = await this.getSchema(projectConfig.name); ->>>>>>> improvement: changes to LSP to prepare for monaco if (schema) { - return getAutocompleteSuggestions(schema, query, position, contextToken); + return getAutocompleteSuggestions(schema, query, position); } return []; } @@ -265,11 +237,7 @@ export class GraphQLLanguageService { filePath: Uri, ): Promise { const projectConfig = this.getConfigForURI(filePath); -<<<<<<< HEAD const schema = await this._graphQLCache.getSchema(projectConfig.name); -======= - const schema = await this.getSchema(projectConfig.name); ->>>>>>> improvement: changes to LSP to prepare for monaco if (schema) { return getHoverInformation(schema, query, position); @@ -347,13 +315,15 @@ export class GraphQLLanguageService { } output.push({ - name: tree.representativeName as string, + // @ts-ignore + name: tree.representativeName, kind: getKind(tree), location: { uri: filePath, range: { start: tree.startPosition, - end: tree.endPosition as Position, + // @ts-ignore + end: tree.endPosition, }, }, containerName: parent ? parent.representativeName : undefined, diff --git a/packages/graphql-language-service-interface/src/__tests__/GraphQLLanguageService-test.ts b/packages/graphql-language-service-interface/src/__tests__/GraphQLLanguageService-test.ts index 3c3968017d1..85bfead7109 100644 --- a/packages/graphql-language-service-interface/src/__tests__/GraphQLLanguageService-test.ts +++ b/packages/graphql-language-service-interface/src/__tests__/GraphQLLanguageService-test.ts @@ -18,7 +18,7 @@ const MOCK_CONFIG = { filepath: join(__dirname, '.graphqlrc.yml'), config: { schema: './__schema__/StarWarsSchema.graphql', - documents: ['./__queries__/**', '**/*.graphql'], + documents: ['./queries/**', '**/*.graphql'], }, }; diff --git a/packages/graphql-language-service-interface/src/__tests__/getDiagnostics-test.ts b/packages/graphql-language-service-interface/src/__tests__/getDiagnostics-test.ts index 58ba5591551..b783aff81f0 100644 --- a/packages/graphql-language-service-interface/src/__tests__/getDiagnostics-test.ts +++ b/packages/graphql-language-service-interface/src/__tests__/getDiagnostics-test.ts @@ -77,6 +77,7 @@ describe('getDiagnostics', () => { expect(errors.length).toEqual(1); const error = errors[0]; expect(error.message).toEqual( + // eslint-disable-next-line no-useless-escape 'Syntax Error: Expected ":", found Name "id".', ); expect(error.severity).toEqual(DIAGNOSTIC_SEVERITY.Error); diff --git a/packages/graphql-language-service-interface/src/__tests__/queries/definitionQuery.graphql b/packages/graphql-language-service-interface/src/__tests__/queries/definitionQuery.graphql new file mode 100644 index 00000000000..a1028da719f --- /dev/null +++ b/packages/graphql-language-service-interface/src/__tests__/queries/definitionQuery.graphql @@ -0,0 +1 @@ +type Query { hero(episode: Episode): Character } \ No newline at end of file diff --git a/packages/graphql-language-service-interface/src/__tests__/queries/testQuery.graphql b/packages/graphql-language-service-interface/src/__tests__/queries/testQuery.graphql new file mode 100644 index 00000000000..e69de29bb2d diff --git a/packages/graphql-language-service-interface/src/getAutocompleteSuggestions.ts b/packages/graphql-language-service-interface/src/getAutocompleteSuggestions.ts index fe58cb4d43a..c868458ef8b 100644 --- a/packages/graphql-language-service-interface/src/getAutocompleteSuggestions.ts +++ b/packages/graphql-language-service-interface/src/getAutocompleteSuggestions.ts @@ -26,8 +26,6 @@ import { State, AllTypeInfo, Position, - RuleKind, - RuleKinds, } from 'graphql-language-service-types'; import { diff --git a/packages/graphql-language-service-interface/src/getDiagnostics.ts b/packages/graphql-language-service-interface/src/getDiagnostics.ts index dad25d29fd6..3de0091d29f 100644 --- a/packages/graphql-language-service-interface/src/getDiagnostics.ts +++ b/packages/graphql-language-service-interface/src/getDiagnostics.ts @@ -31,6 +31,7 @@ import { import { DiagnosticSeverity, Diagnostic } from 'vscode-languageserver-types'; // this doesn't work without the 'as', kinda goofy + export const SEVERITY = { Error: 'Error' as 'Error', Warning: 'Warning' as 'Warning', @@ -94,8 +95,8 @@ export function validateQuery( const deprecationWarningAnnotations = !findDeprecatedUsages ? [] : mapCat(findDeprecatedUsages(schema, ast), error => - annotations(error, DIAGNOSTIC_SEVERITY.Warning, 'Deprecation'), - ); + annotations(error, DIAGNOSTIC_SEVERITY.Warning, 'Deprecation'), + ); return validationErrorAnnotations.concat(deprecationWarningAnnotations); } @@ -122,8 +123,8 @@ function annotations( node.kind !== 'Variable' && 'name' in node ? node.name : 'variable' in node - ? node.variable - : node; + ? node.variable + : node; if (highlightNode) { invariant( error.locations, @@ -149,45 +150,6 @@ function annotations( return highlightedNodes; } -export function getTokenRange( - location: SourceLocation, - queryText: string, -): Range { - const parser = onlineParser(); - const state = parser.startState(); - const lines = queryText.split('\n'); - - invariant( - lines.length >= location.line, - 'Query text must have more lines than where the error happened', - ); - - let stream = null; - - for (let i = 0; i < location.line; i++) { - stream = new CharacterStream(lines[i]); - while (!stream.eol()) { - parser.token(stream, state); - - if ( - i === location.line - 1 && - location.column - 1 >= stream._start && - location.column - 1 <= stream._pos - ) { - return new Range( - new Position(location.line - 1, stream._start), - new Position(location.line - 1, stream._pos), - ); - } - } - } - - return new Range( - new Position(location.line - 1, location.column - 1), - new Position(location.line - 1, location.column - 1), - ); -} - export function getRange(location: SourceLocation, queryText: string): Range { const parser = onlineParser(); const state = parser.startState(); diff --git a/packages/graphql-language-service-interface/src/index.ts b/packages/graphql-language-service-interface/src/index.ts index 1b9fb2e26e5..d27a636c431 100644 --- a/packages/graphql-language-service-interface/src/index.ts +++ b/packages/graphql-language-service-interface/src/index.ts @@ -13,18 +13,9 @@ export * from './getAutocompleteSuggestions'; export * from './getDefinition'; -export { - getDiagnostics, - validateQuery, - DIAGNOSTIC_SEVERITY, - SEVERITY -} from './getDiagnostics'; +export * from './getDiagnostics'; export { getOutline } from './getOutline'; export { getHoverInformation } from './getHoverInformation'; export * from './GraphQLLanguageService'; -export * from './GraphQLCache'; -export * from './parseDocument'; -export * from './findGraphQLTags'; -export * from './stringToHash'; diff --git a/packages/graphql-language-service-interface/tsconfig.esm.json b/packages/graphql-language-service-interface/tsconfig.esm.json index 296dd9afbae..8489b62cd9a 100644 --- a/packages/graphql-language-service-interface/tsconfig.esm.json +++ b/packages/graphql-language-service-interface/tsconfig.esm.json @@ -17,5 +17,5 @@ } ], "include": ["src"], - "exclude": ["**/__tests__/**", "**/*.spec.*", "dist", "esm", "node_modules"] + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/graphql-language-service-interface/tsconfig.json b/packages/graphql-language-service-interface/tsconfig.json index be63aa13480..a9a37f7b0be 100644 --- a/packages/graphql-language-service-interface/tsconfig.json +++ b/packages/graphql-language-service-interface/tsconfig.json @@ -17,5 +17,5 @@ } ], "include": ["src"], - "exclude": ["**/__tests__/**", "**/*.spec.*", "dist", "esm", "node_modules"] + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/graphql-language-service-parser/tsconfig.esm.json b/packages/graphql-language-service-parser/tsconfig.esm.json index b3691334924..50fa055b413 100644 --- a/packages/graphql-language-service-parser/tsconfig.esm.json +++ b/packages/graphql-language-service-parser/tsconfig.esm.json @@ -11,5 +11,5 @@ } ], "include": ["src"], - "exclude": ["**/__tests__/**", "**/*.spec.*", "dist", "esm", "node_modules"] + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/graphql-language-service-parser/tsconfig.json b/packages/graphql-language-service-parser/tsconfig.json index 01ab9cedb15..73f162f627b 100644 --- a/packages/graphql-language-service-parser/tsconfig.json +++ b/packages/graphql-language-service-parser/tsconfig.json @@ -11,5 +11,5 @@ } ], "include": ["src"], - "exclude": ["**/__tests__/**", "**/*.spec.*", "dist", "esm", "node_modules"] + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/graphql-language-service-interface/src/GraphQLCache.ts b/packages/graphql-language-service-server/src/GraphQLCache.ts similarity index 99% rename from packages/graphql-language-service-interface/src/GraphQLCache.ts rename to packages/graphql-language-service-server/src/GraphQLCache.ts index e5f6ed78e80..ee4a118d237 100644 --- a/packages/graphql-language-service-interface/src/GraphQLCache.ts +++ b/packages/graphql-language-service-server/src/GraphQLCache.ts @@ -10,6 +10,7 @@ import { ASTNode, DocumentNode, DefinitionNode } from 'graphql/language'; import { CachedContent, + GraphQLCache as GraphQLCacheInterface, GraphQLFileMetadata, GraphQLFileInfo, FragmentInfo, @@ -56,7 +57,7 @@ export async function getGraphQLCache( parser: typeof parseDocument, extensions?: Array<(config: GraphQLConfig) => GraphQLConfig>, config?: GraphQLConfig, -): Promise { +): Promise { let graphQLConfig = config ?? ((await loadConfig({ rootDir: configDir })) as GraphQLConfig); if (extensions && extensions.length > 0) { @@ -67,7 +68,7 @@ export async function getGraphQLCache( return new GraphQLCache(configDir, graphQLConfig, parser); } -export class GraphQLCache { +export class GraphQLCache implements GraphQLCacheInterface { _configDir: Uri; _graphQLFileListCache: Map>; _graphQLConfig: GraphQLConfig; @@ -678,7 +679,7 @@ export class GraphQLCache { } _getProjectName(projectConfig: GraphQLProjectConfig) { - return projectConfig; + return projectConfig || 'default'; } /** diff --git a/packages/graphql-language-service-server/src/MessageProcessor.ts b/packages/graphql-language-service-server/src/MessageProcessor.ts index 253a43e78ef..3db7e375c81 100644 --- a/packages/graphql-language-service-server/src/MessageProcessor.ts +++ b/packages/graphql-language-service-server/src/MessageProcessor.ts @@ -12,6 +12,7 @@ import { URL } from 'url'; import { CachedContent, + GraphQLCache, Uri, FileChangeTypeKind, DefinitionQueryResult, @@ -49,11 +50,8 @@ import { SymbolInformation, } from 'vscode-languageserver'; -import { - getGraphQLCache, - GraphQLCache, - parseDocument, -} from 'graphql-languageservice'; +import { getGraphQLCache } from './GraphQLCache'; +import { parseDocument } from './parseDocument'; import { Logger } from './Logger'; diff --git a/packages/graphql-language-service-server/src/__tests__/.graphqlrc.yml b/packages/graphql-language-service-server/src/__tests__/.graphqlrc.yml index 3b82b9d4c15..65f03980405 100644 --- a/packages/graphql-language-service-server/src/__tests__/.graphqlrc.yml +++ b/packages/graphql-language-service-server/src/__tests__/.graphqlrc.yml @@ -1,11 +1,8 @@ -schema: '__schema__/StarWarsSchema.graphql' projects: - default: - schema: '__schema__/StarWarsSchema.graphql' testWithSchema: - schema: - - __schema__/StarWarsSchema.graphql - - 'directive @customDirective on FRAGMENT_SPREAD' + schema: + - __schema__/StarWarsSchema.graphql + - "directive @customDirective on FRAGMENT_SPREAD" testWithEndpoint: schema: https://example.com/graphql testWithEndpointAndSchema: @@ -13,17 +10,17 @@ projects: - __schema__/StarWarsSchema.graphql - https://example.com/graphql testWithoutSchema: - schema: '' + schema: "" testWithCustomDirectives: - schema: + schema: - __schema__/StarWarsSchema.graphql - - 'directive @customDirective on FIELD' + - "directive @customDirective on FIELD" testSingularIncludesGlob: schema: __schema__/StarWarsSchema.graphql include: __queries__/*.graphql testMultipleIncludes: schema: __schema__/StarWarsSchema.graphql - include: + include: - __queries__/*.graphql - __fragments__/*.graphql testNoIncludes: diff --git a/packages/graphql-language-service-interface/src/__tests__/GraphQLCache-test.ts b/packages/graphql-language-service-server/src/__tests__/GraphQLCache-test.ts similarity index 100% rename from packages/graphql-language-service-interface/src/__tests__/GraphQLCache-test.ts rename to packages/graphql-language-service-server/src/__tests__/GraphQLCache-test.ts diff --git a/packages/graphql-language-service-server/src/__tests__/MessageProcessor-test.ts b/packages/graphql-language-service-server/src/__tests__/MessageProcessor-test.ts index ed0aa28df43..102439be608 100644 --- a/packages/graphql-language-service-server/src/__tests__/MessageProcessor-test.ts +++ b/packages/graphql-language-service-server/src/__tests__/MessageProcessor-test.ts @@ -10,7 +10,7 @@ import { SymbolKind } from 'vscode-languageserver'; import { Position, Range } from 'graphql-language-service-utils'; import { MessageProcessor } from '../MessageProcessor'; -import { parseDocument } from 'graphql-languageservice'; +import { parseDocument } from '../parseDocument'; jest.mock('../Logger'); diff --git a/packages/graphql-language-service-server/src/__tests__/__queries__/test2.graphql b/packages/graphql-language-service-server/src/__tests__/__queries__/test2.graphql new file mode 100644 index 00000000000..e69de29bb2d diff --git a/packages/graphql-language-service-interface/src/__tests__/__queries__/testFragment.graphql b/packages/graphql-language-service-server/src/__tests__/__queries__/testFragment.graphql similarity index 100% rename from packages/graphql-language-service-interface/src/__tests__/__queries__/testFragment.graphql rename to packages/graphql-language-service-server/src/__tests__/__queries__/testFragment.graphql diff --git a/packages/graphql-language-service-interface/src/findGraphQLTags.ts b/packages/graphql-language-service-server/src/findGraphQLTags.ts similarity index 100% rename from packages/graphql-language-service-interface/src/findGraphQLTags.ts rename to packages/graphql-language-service-server/src/findGraphQLTags.ts diff --git a/packages/graphql-language-service-server/src/index.ts b/packages/graphql-language-service-server/src/index.ts index ed4bcf44a7d..ee6675e89fb 100644 --- a/packages/graphql-language-service-server/src/index.ts +++ b/packages/graphql-language-service-server/src/index.ts @@ -12,3 +12,8 @@ export { MessageProcessor } from './MessageProcessor'; export { default as startServer } from './startServer'; export { Logger } from './Logger'; + +export * from './GraphQLCache'; +export * from './parseDocument'; +export * from './findGraphQLTags'; +export * from './stringToHash'; diff --git a/packages/graphql-language-service-interface/src/parseDocument.ts b/packages/graphql-language-service-server/src/parseDocument.ts similarity index 100% rename from packages/graphql-language-service-interface/src/parseDocument.ts rename to packages/graphql-language-service-server/src/parseDocument.ts diff --git a/packages/graphql-language-service-server/src/startServer.ts b/packages/graphql-language-service-server/src/startServer.ts index 23589674056..325cae2deed 100644 --- a/packages/graphql-language-service-server/src/startServer.ts +++ b/packages/graphql-language-service-server/src/startServer.ts @@ -42,7 +42,7 @@ import { } from 'vscode-languageserver'; import { Logger } from './Logger'; -import { parseDocument } from 'graphql-languageservice'; +import { parseDocument } from './parseDocument'; export type ServerOptions = { // port for the LSP server to run on. required if using method socket diff --git a/packages/graphql-language-service-interface/src/stringToHash.ts b/packages/graphql-language-service-server/src/stringToHash.ts similarity index 100% rename from packages/graphql-language-service-interface/src/stringToHash.ts rename to packages/graphql-language-service-server/src/stringToHash.ts diff --git a/packages/graphql-language-service-server/tsconfig.esm.json b/packages/graphql-language-service-server/tsconfig.esm.json index 935bc00005f..09ee15dcd42 100644 --- a/packages/graphql-language-service-server/tsconfig.esm.json +++ b/packages/graphql-language-service-server/tsconfig.esm.json @@ -8,12 +8,15 @@ }, "references": [ { - "path": "../graphql-languageservice" + "path": "../graphql-language-service-types" + }, + { + "path": "../graphql-language-service-interface" }, { "path": "../graphql-language-service-utils" } ], "include": ["src"], - "exclude": ["**/__tests__/**", "**/*.spec.*", "dist", "esm", "node_modules"] + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/graphql-language-service-server/tsconfig.json b/packages/graphql-language-service-server/tsconfig.json index 9c275e3e016..c801d9f9871 100644 --- a/packages/graphql-language-service-server/tsconfig.json +++ b/packages/graphql-language-service-server/tsconfig.json @@ -8,12 +8,15 @@ }, "references": [ { - "path": "../graphql-languageservice" + "path": "../graphql-language-service-types" + }, + { + "path": "../graphql-language-service-interface" }, { "path": "../graphql-language-service-utils" } ], "include": ["src"], - "exclude": ["**/__tests__/**", "**/*.spec.*", "dist", "esm", "node_modules"] + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/graphql-language-service-types/tsconfig.esm.json b/packages/graphql-language-service-types/tsconfig.esm.json index 0b694e9be11..25814f05af7 100644 --- a/packages/graphql-language-service-types/tsconfig.esm.json +++ b/packages/graphql-language-service-types/tsconfig.esm.json @@ -5,5 +5,5 @@ "outDir": "./esm" }, "include": ["src"], - "exclude": ["**/__tests__/**", "**/*.spec.*", "dist", "esm", "node_modules"] + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/graphql-language-service-types/tsconfig.json b/packages/graphql-language-service-types/tsconfig.json index 646f1032440..44446b9fe8f 100644 --- a/packages/graphql-language-service-types/tsconfig.json +++ b/packages/graphql-language-service-types/tsconfig.json @@ -6,5 +6,5 @@ "outDir": "./dist" }, "include": ["src"], - "exclude": ["**/__tests__/**", "**/*.spec.*", "dist", "esm", "node_modules"] + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/graphql-language-service-utils/tsconfig.esm.json b/packages/graphql-language-service-utils/tsconfig.esm.json index cefbc6b5622..0e4f2330fe7 100644 --- a/packages/graphql-language-service-utils/tsconfig.esm.json +++ b/packages/graphql-language-service-utils/tsconfig.esm.json @@ -11,5 +11,5 @@ } ], "include": ["src"], - "exclude": ["**/__tests__/**", "**/*.spec.*", "dist", "esm", "node_modules"] + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/graphql-language-service-utils/tsconfig.json b/packages/graphql-language-service-utils/tsconfig.json index feec0ff87d0..585bb921214 100644 --- a/packages/graphql-language-service-utils/tsconfig.json +++ b/packages/graphql-language-service-utils/tsconfig.json @@ -11,5 +11,5 @@ } ], "include": ["src"], - "exclude": ["**/__tests__/**", "**/*.spec.*", "dist", "esm", "node_modules"] + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/graphql-language-service/.npmignore b/packages/graphql-language-service/.npmignore new file mode 100644 index 00000000000..1e433b22baa --- /dev/null +++ b/packages/graphql-language-service/.npmignore @@ -0,0 +1,3 @@ +node_modules +src +yarn.lock diff --git a/packages/graphql-language-service/src/client.ts b/packages/graphql-language-service/src/client.ts index 08d5584e775..00c5b489b0e 100644 --- a/packages/graphql-language-service/src/client.ts +++ b/packages/graphql-language-service/src/client.ts @@ -16,13 +16,10 @@ import { getAutocompleteSuggestions, getDiagnostics, getOutline, - CompletionItem, - Diagnostic, -} from 'graphql-languageservice'; - +} from 'graphql-language-service-interface'; import { Position } from 'graphql-language-service-utils'; - import path from 'path'; +import { CompletionItem, Diagnostic } from 'graphql-language-service-types/src'; const GRAPHQL_SUCCESS_CODE = 0; const GRAPHQL_FAILURE_CODE = 1; diff --git a/packages/graphql-language-service/tsconfig.json b/packages/graphql-language-service/tsconfig.json index 4269cc39950..480002d421b 100644 --- a/packages/graphql-language-service/tsconfig.json +++ b/packages/graphql-language-service/tsconfig.json @@ -11,8 +11,15 @@ "path": "../graphql-language-service-server" }, { - "path": "../graphql-languageservice" + "path": "../graphql-language-service-interface" + }, + { + "path": "../graphql-language-service-utils" + }, + { + "path": "../graphql-language-service-types" } ], - "include": ["src"] + "include": ["src"], + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/graphql-languageservice/package.json b/packages/graphql-languageservice/package.json index 4d4b2ae2df3..77669bf0392 100644 --- a/packages/graphql-languageservice/package.json +++ b/packages/graphql-languageservice/package.json @@ -25,7 +25,7 @@ "graphql": "^0.13.0 || ^14.0.0 || ^15.0.0" }, "devDependencies": { - "graphql-language-service-types": "^1.6.0-alpha.4" + "graphql-language-service-types": "^1.6.0-alpha.5" }, "dependencies": { "graphql-config": "3.0.0-rc.2", diff --git a/packages/graphql-languageservice/src/LanguageService.ts b/packages/graphql-languageservice/src/LanguageService.ts new file mode 100644 index 00000000000..ffa962e8d19 --- /dev/null +++ b/packages/graphql-languageservice/src/LanguageService.ts @@ -0,0 +1,81 @@ +/** + * Copyright (c) 2020 GraphQL Contributors. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import { loadSchema } from '@graphql-toolkit/core'; +import { UrlLoader } from '@graphql-toolkit/url-loader'; +import { Loader, SingleFileOptions } from '@graphql-toolkit/common'; +import { parse, GraphQLSchema, ParseOptions } from 'graphql'; +import { Position } from 'graphql-language-service-types'; +import * as graphqlLS from 'graphql-language-service-interface'; + +type LSPConfig = { + uri: string; + parser?: typeof parse; + schemaLoaders?: Loader[]; +}; + +export class LanguageService { + private _parser: typeof parse; + private _uri: string; + private _schema: GraphQLSchema | null; + private _schemaLoaders: Loader[]; + + constructor({ uri, parser, schemaLoaders }: LSPConfig) { + this._uri = uri; + this._parser = parser || parse; + this._schema = null; + this._schemaLoaders = schemaLoaders || [new UrlLoader()]; + } + + public get schema() { + return this._schema as GraphQLSchema; + } + + async getSchema() { + if (this.schema) { + return this.schema; + } + return this.loadSchema(); + } + + async loadSchema() { + if (!this._uri) { + throw new Error('uri missing'); + } + const schema = await loadSchema(this._uri, { + // load from endpoint + loaders: this._schemaLoaders, + }); + this._schema = schema; + return schema; + } + + async parse(text: string, options?: ParseOptions) { + return this._parser(text, options); + } + + getCompletion = async ( + _uri: string, + documentText: string, + position: Position, + ) => + graphqlLS.getAutocompleteSuggestions( + await this.getSchema(), + documentText, + position, + ); + + getDiagnostics = async (_uri: string, documentText: string) => + graphqlLS.getDiagnostics(documentText, await this.getSchema()); + + getHover = async (_uri: string, documentText: string, position: Position) => + graphqlLS.getHoverInformation( + await this.getSchema(), + documentText, + position, + ); +} diff --git a/packages/graphql-languageservice/src/index.ts b/packages/graphql-languageservice/src/index.ts index 6aeff8227f8..997ea926fe8 100644 --- a/packages/graphql-languageservice/src/index.ts +++ b/packages/graphql-languageservice/src/index.ts @@ -6,7 +6,7 @@ * LICENSE file in the root directory of this source tree. * */ - +export * from './LanguageService'; export * from 'graphql-language-service-interface'; export * from 'graphql-language-service-parser'; export * from 'graphql-language-service-types'; diff --git a/packages/graphql-languageservice/tsconfig.esm.json b/packages/graphql-languageservice/tsconfig.esm.json index d49a6c050d1..40e9d246a5d 100644 --- a/packages/graphql-languageservice/tsconfig.esm.json +++ b/packages/graphql-languageservice/tsconfig.esm.json @@ -19,11 +19,6 @@ "path": "../graphql-language-service-utils" } ], - "include": [ - "src" - ], - "exclude": [ - "**/__tests__/**", - "**/*.spec.*" - ] + "include": ["src"], + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/graphql-languageservice/tsconfig.json b/packages/graphql-languageservice/tsconfig.json index 1e3a7fdc64c..718d91e7c98 100644 --- a/packages/graphql-languageservice/tsconfig.json +++ b/packages/graphql-languageservice/tsconfig.json @@ -19,11 +19,6 @@ "path": "../graphql-language-service-utils" } ], - "include": [ - "src" - ], - "exclude": [ - "**/__tests__/**", - "**/*.spec.*" - ] + "include": ["src"], + "exclude": ["**/__tests__/**", "**/*.spec.*"] } diff --git a/packages/monaco-graphql/package.json b/packages/monaco-graphql/package.json index 7066c7ba2c3..c901efbbf0a 100644 --- a/packages/monaco-graphql/package.json +++ b/packages/monaco-graphql/package.json @@ -1,9 +1,20 @@ { "name": "monaco-graphql", - "version": "2.3.4-alpha.4", + "description": "full service, official monaco mode for GraphQL", + "version": "2.3.4-alpha.5", "main": "dist/monaco.contribution.js", "module": "esm/monaco.contribution.js", - "typings": "dist/monaco.contribution.d.ts", + "typings": "dist/typings/monaco.d.ts", + "contributors": [ + { + "name": "Peng Lyu", + "url": "https://github.com/rebornix" + }, + { + "name": "Rikki Schulte", + "url": "https://github.com/acao" + } + ], "dependencies": { "@graphql-toolkit/module-loader": "0.9.9", "graphql-language-service-utils": "^2.4.0-alpha.3", diff --git a/packages/monaco-graphql/src/BrowserLoader.ts b/packages/monaco-graphql/src/BrowserLoader.ts deleted file mode 100644 index b49444c4133..00000000000 --- a/packages/monaco-graphql/src/BrowserLoader.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { - Source, - parseGraphQLJSON, - SchemaPointerSingle, - UniversalLoader, - SingleFileOptions, -} from '@graphql-toolkit/common'; - -type BrowserLoaderOptions = { - schemaUrl: string; -} & SingleFileOptions; - -export class BrowserLoader implements UniversalLoader { - loaderId(): string { - return 'browser'; - } - - async canLoad( - _pointer: SchemaPointerSingle, - _options: BrowserLoaderOptions, - ): Promise { - return Boolean(document.getElementById('graphql-config')); - } - - async load( - pointer: SchemaPointerSingle, - options: BrowserLoaderOptions, - ): Promise { - if (!options.schemaUrl) { - throw Error('schemaUrl option not provided'); - } - - try { - const configEl = document.getElementById('graphql-config'); - if (!configEl) { - const div = document.createElement('div'); - div.id = 'graphql-config'; - div.innerText = `{ "schema": "${options.schemaUrl}" }`; - document.body.appendChild(div); - return JSON.parse(div.innerText); - } - const jsonContent = JSON.parse(configEl?.innerText); - return parseGraphQLJSON(pointer, jsonContent, options); - } catch (e) { - throw new Error( - `Unable to read browser json: ${options.schemaUrl}: ${e.message || e}`, - ); - } - } -} diff --git a/packages/monaco-graphql/src/defaults.ts b/packages/monaco-graphql/src/defaults.ts new file mode 100644 index 00000000000..346283e0921 --- /dev/null +++ b/packages/monaco-graphql/src/defaults.ts @@ -0,0 +1,85 @@ +/** + * Copyright (c) 2020 GraphQL Contributors. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +import * as monacoEditor from 'monaco-editor'; + +export class LanguageServiceDefaultsImpl + implements monaco.languages.graphql.LanguageServiceDefaults { + // @ts-ignore + private _onDidChange = new monacoEditor.Emitter< + monaco.languages.graphql.LanguageServiceDefaults + >(); + private _diagnosticsOptions!: monaco.languages.graphql.DiagnosticsOptions; + private _modeConfiguration!: monaco.languages.graphql.ModeConfiguration; + private _languageId: string; + + constructor( + languageId: string, + diagnosticsOptions: monaco.languages.graphql.DiagnosticsOptions, + modeConfiguration: monaco.languages.graphql.ModeConfiguration, + ) { + this._languageId = languageId; + this.setDiagnosticsOptions(diagnosticsOptions); + this.setModeConfiguration(modeConfiguration); + } + // @ts-ignore + get onDidChange(): monaco.IEvent< + monaco.languages.graphql.LanguageServiceDefaults + > { + return this._onDidChange.event; + } + + get languageId(): string { + return this._languageId; + } + get modeConfiguration(): monaco.languages.graphql.ModeConfiguration { + return this._modeConfiguration; + } + get diagnosticsOptions(): monaco.languages.graphql.DiagnosticsOptions { + return this._diagnosticsOptions; + } + + setDiagnosticsOptions( + options: monaco.languages.graphql.DiagnosticsOptions, + ): void { + this._diagnosticsOptions = options || Object.create(null); + this._onDidChange.fire(this); + } + + setSchemaUri(schemaUri: string): void { + this.setDiagnosticsOptions({ ...this.diagnosticsOptions, schemaUri }); + this._onDidChange.fire(this); + } + + setModeConfiguration( + modeConfiguration: monaco.languages.graphql.ModeConfiguration, + ): void { + this._modeConfiguration = modeConfiguration || Object.create(null); + this._onDidChange.fire(this); + } +} + +export const diagnosticDefault: Required = { + validate: true, + allowComments: true, + schemas: [], + enableSchemaRequest: true, + schemaUri: 'https://swapi-graphql.netlify.com/.netlify/functions/index', +}; + +export const modeConfigurationDefault: Required = { + documentFormattingEdits: true, + documentRangeFormattingEdits: false, + completionItems: true, + hovers: true, + documentSymbols: false, + tokens: false, + colors: false, + foldingRanges: false, + diagnostics: true, + selectionRanges: false, +}; diff --git a/packages/monaco-graphql/src/graphql.worker.ts b/packages/monaco-graphql/src/graphql.worker.ts index 2b423564f00..bde3088841a 100644 --- a/packages/monaco-graphql/src/graphql.worker.ts +++ b/packages/monaco-graphql/src/graphql.worker.ts @@ -1,75 +1,38 @@ +/** + * Copyright (c) 2020 GraphQL Contributors. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import * as monaco from 'monaco-editor'; -import { buildClientSchema } from 'graphql'; // @ts-ignore import * as worker from 'monaco-editor/esm/vs/editor/editor.worker'; -import { Range } from 'graphql-language-service-types'; -import { CompletionItem as lsCompletionItem } from 'vscode-languageserver-types'; +import { Range as GraphQLRange } from 'graphql-language-service-types'; export interface ICreateData { languageId: string; enableSchemaRequest: boolean; - schemaUrl: String; + schemaUrl: string; } -// @ts-ignore + import { - getDiagnostics, - Diagnostic, getRange, - getAutocompleteSuggestions, - getHoverInformation, - getTokenRange, + CompletionItem as GraphQLCompletionItem, + LanguageService, } from 'graphql-languageservice'; -import introspectionQuery from './schema'; - -// console.log(MonacoRange) -// @ts-ignore -const schema = buildClientSchema(introspectionQuery, { assumeValid: false }); - -export class Position { - line: number; - character: number; - constructor(line: number, character: number) { - this.line = line; - this.character = character; - } +import { toGraphQLPosition, toMonacoRange, toMarkerData } from './utils'; - setLine(line: number) { - this.line = line; - } - - setCharacter(character: number) { - this.character = character; - } - - lessThanOrEqualTo = (position: Position): boolean => - this.line < position.line || - (this.line === position.line && this.character <= position.character); -} - -export type CompletionItem = monaco.languages.CompletionItem & { +export type MonacoCompletionItem = monaco.languages.CompletionItem & { isDeprecated?: boolean; deprecationReason?: string | null; }; -export function toRange(range: Range): monaco.IRange { - return { - startLineNumber: range.start.line + 1, - startColumn: range.start.character + 1, - endLineNumber: range.end.line + 1, - endColumn: range.end.character + 1, - }; -} - -export function toGraphQLPosition(position: monaco.Position): Position { - const pos = new Position(position.lineNumber - 1, position.column - 1); - pos.setCharacter(position.column - 1); - pos.line = position.lineNumber - 1; - return pos; -} - -export function toCompletion(entry: CompletionItem, range: Range) { - // @ts-ignore +export function toCompletion( + entry: GraphQLCompletionItem, + range: GraphQLRange, +): GraphQLCompletionItem & { range: monaco.IRange } { return { label: entry.label, insertText: entry.insertText || (entry.label as string), @@ -77,58 +40,45 @@ export function toCompletion(entry: CompletionItem, range: Range) { filterText: entry.filterText, documentation: entry.documentation, detail: entry.detail, - range: toRange(range), + range: toMonacoRange(range), kind: entry.kind, }; } -export function toMarkerData( - diagnostic: Diagnostic, -): monaco.editor.IMarkerData { - return { - startLineNumber: diagnostic.range.start.line + 1, - endLineNumber: diagnostic.range.end.line + 1, - startColumn: diagnostic.range.start.character + 1, - endColumn: diagnostic.range.end.character + 1, - message: diagnostic.message, - severity: 5 || (diagnostic.severity as monaco.MarkerSeverity), - code: (diagnostic.code as string) || undefined, - }; -} - export class GraphQLWorker { private _ctx: monaco.worker.IWorkerContext; - // @ts-ignore - // private _languageService: graphqlService.LanguageService; - // private schema: GraphQLSchema | null; + private _languageService: LanguageService; constructor(ctx: monaco.worker.IWorkerContext, createData: ICreateData) { this._ctx = ctx; - // this.schema = null; - console.log({ ctx, createData }); + this._languageService = new LanguageService({ uri: createData.schemaUrl }); + } + async getSchema() { + return this._languageService.getSchema(); } async doValidation(uri: string): Promise { const document = this._getTextDocument(uri); - // @ts-ignore - const graphqlDiagnostics = await getDiagnostics(document, schema); + const graphqlDiagnostics = await this._languageService.getDiagnostics( + uri, + document, + ); return graphqlDiagnostics.map(toMarkerData); } + async doComplete( uri: string, position: monaco.Position, - ): Promise<(lsCompletionItem & { range: monaco.IRange })[]> { + ): Promise<(GraphQLCompletionItem & { range: monaco.IRange })[]> { const document = this._getTextDocument(uri); const graphQLPosition = toGraphQLPosition(position); - const suggestions = await getAutocompleteSuggestions( - schema, + const suggestions = await this._languageService.getCompletion( + uri, document, - // @ts-ignore graphQLPosition, ); - return suggestions.map((e: CompletionItem) => + return suggestions.map(suggestion => toCompletion( - e, - // @ts-ignore + suggestion, getRange( { column: graphQLPosition.character + 1, @@ -144,18 +94,16 @@ export class GraphQLWorker { const document = this._getTextDocument(uri); const graphQLPosition = toGraphQLPosition(position); - const hover = await getHoverInformation( - schema, + const hover = await this._languageService.getHover( + uri, document, - // @ts-ignore graphQLPosition, ); return { content: hover, - // @ts-ignore - range: toRange( - getTokenRange( + range: toMonacoRange( + getRange( { column: graphQLPosition.character + 1, line: graphQLPosition.line + 1, @@ -165,11 +113,19 @@ export class GraphQLWorker { ), }; } + async doFormat(text: string): Promise { + const prettierStandalone = await import('prettier/standalone'); + const prettierGraphqlParser = await import('prettier/parser-graphql'); + + return prettierStandalone.format(text, { + parser: 'graphql', + plugins: [prettierGraphqlParser], + }); + } private _getTextDocument(_uri: string): string { const models = this._ctx.getMirrorModels(); if (models.length > 0) { - console.log(models[0].uri); return models[0].getValue(); } return ''; @@ -181,12 +137,10 @@ self.onmessage = () => { // ignore the first message worker.initialize( (ctx: monaco.worker.IWorkerContext, createData: ICreateData) => { - console.log('worker initialized'); return new GraphQLWorker(ctx, createData); }, ); } catch (err) { - console.error(err); throw err; } }; diff --git a/packages/monaco-graphql/src/graphqlMode.ts b/packages/monaco-graphql/src/graphqlMode.ts index 133ca636e6e..71cf15c23d3 100644 --- a/packages/monaco-graphql/src/graphqlMode.ts +++ b/packages/monaco-graphql/src/graphqlMode.ts @@ -1,23 +1,26 @@ +/** + * Copyright (c) 2020 GraphQL Contributors. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import * as monaco from 'monaco-editor'; import IRichLanguageConfiguration = monaco.languages.LanguageConfiguration; import { WorkerManager } from './workerManager'; import { GraphQLWorker } from './graphql.worker'; -import { - LanguageServiceDefaultsImpl, - LANGUAGE_ID, - monarchLanguage, -} from './monaco.contribution'; +import { monarchLanguage } from './monaco.contribution'; +import { LanguageServiceDefaultsImpl } from './defaults'; import * as languageFeatures from './languageFeatures'; -// @ts-ignore -import Uri = monaco.Uri; -import IDisposable = monaco.IDisposable; +import { Uri, IDisposable } from 'monaco-editor'; export function setupMode(defaults: LanguageServiceDefaultsImpl): IDisposable { const disposables: IDisposable[] = []; const providers: IDisposable[] = []; const client = new WorkerManager(defaults); + const { languageId } = defaults; // client.getLanguageServiceWorker() disposables.push(client); const worker: languageFeatures.WorkerAccessor = ( @@ -26,6 +29,9 @@ export function setupMode(defaults: LanguageServiceDefaultsImpl): IDisposable { return client.getLanguageServiceWorker(...uris); }; + monaco.languages.setLanguageConfiguration(languageId, richLanguageConfig); + monaco.languages.setMonarchTokensProvider(languageId, monarchLanguage); + function registerProviders(): void { const { modeConfiguration } = defaults; disposeAll(providers); @@ -41,13 +47,23 @@ export function setupMode(defaults: LanguageServiceDefaultsImpl): IDisposable { if (modeConfiguration.diagnostics) { providers.push(new languageFeatures.DiagnosticsAdapter(defaults, worker)); } + if (modeConfiguration.hovers) { + providers.push( + monaco.languages.registerHoverProvider( + defaults.languageId, + new languageFeatures.HoverAdapter(worker), + ), + ); + } - providers.push( - monaco.languages.registerHoverProvider( - defaults.languageId, - new languageFeatures.HoverAdapter(worker), - ), - ); + if (modeConfiguration.documentFormattingEdits) { + providers.push( + monaco.languages.registerDocumentFormattingEditProvider( + defaults.languageId, + new languageFeatures.DocumentFormattingAdapter(worker), + ), + ); + } } registerProviders(); @@ -105,6 +121,3 @@ export const richLanguageConfig: IRichLanguageConfiguration = { offSide: true, }, }; - -monaco.languages.setLanguageConfiguration(LANGUAGE_ID, richLanguageConfig); -monaco.languages.setMonarchTokensProvider(LANGUAGE_ID, monarchLanguage); diff --git a/packages/monaco-graphql/src/graphqlWorker.ts b/packages/monaco-graphql/src/graphqlWorker.ts deleted file mode 100644 index 941a0a7276c..00000000000 --- a/packages/monaco-graphql/src/graphqlWorker.ts +++ /dev/null @@ -1,226 +0,0 @@ -// // / -// import * as monaco from 'monaco-editor'; -// // import { GraphQLExtensionDeclaration } from 'graphql-config' -// import IWorkerContext = monaco.worker.IWorkerContext; - -// import * as graphqlService from 'graphql-languageservice'; - -// import { Position } from 'graphql-language-service-utils'; -// import { GraphQLSchema } from 'graphql'; -// // @ts-ignore -// import { toMarkerData, toCompletion, toGraphQLPosition } from './utils'; - -// import { -// getRange, -// GraphQLLanguageService, -// } from 'graphql-language-service-interface'; - -// import { -// GraphQLConfig, -// loadConfig, -// GraphQLExtensionDeclaration, -// } from 'graphql-config'; -// import { UrlLoader } from '@graphql-toolkit/url-loader'; -// import { TextDocument } from 'vscode-languageserver-textdocument'; -// // import { BrowserLoader } from './BrowserLoader' - -// const BrowserConfigExtension: GraphQLExtensionDeclaration = api => { -// api.loaders.schema.register(new UrlLoader()); - -// api.loaders.documents.register(new UrlLoader()); - -// return { -// name: 'graphiql', -// }; -// }; - -// type callbackFnType = ( -// stream: graphqlService.CharacterStream, -// state: graphqlService.State, -// style: string, -// index: number, -// ) => void | 'BREAK'; - -// function runOnlineParser( -// queryText: string, -// callback: callbackFnType, -// ): graphqlService.ContextToken { -// const lines = queryText.split('\n'); -// const parser = graphqlService.onlineParser(); -// let state = parser.startState(); -// let style = ''; - -// let stream = new graphqlService.CharacterStream(''); - -// for (let i = 0; i < lines.length; i++) { -// stream = new graphqlService.CharacterStream(lines[i]); -// while (!stream.eol()) { -// style = parser.token(stream, state); -// const code = callback(stream, state, style, i); -// if (code === 'BREAK') { -// break; -// } -// } - -// // Above while loop won't run if there is an empty line. -// // Run the callback one more time to catch this. -// callback(stream, state, style, i); - -// if (!state.kind) { -// state = parser.startState(); -// } -// } - -// return { -// start: stream.getStartOfToken(), -// end: stream.getCurrentPosition(), -// string: stream.current(), -// state, -// style, -// }; -// } - -// export class GraphQLWorker { -// private _ctx: IWorkerContext; -// private _languageService: graphqlService.GraphQLLanguageService | null; -// // @ts-ignore -// private _languageSettings: monaco.languages.graphql.LanguageSettings; -// private _languageId: string; -// private _schema: GraphQLSchema | null; - -// constructor(ctx: IWorkerContext, createData: ICreateData) { -// this._ctx = ctx; -// // this._languageId = createData.languageId; -// this._schema = null; -// this._languageService = null; -// this._languageId = createData.languageId; -// // @ts-ignore -// this._languageSettings = createData.languageSettings; -// } -// public async getLanguageService(): Promise { -// if (this._languageService) { -// return this._languageService; -// } -// const config = await loadConfig({ -// filepath: 'default/graphqlrc.yml', -// extensions: [BrowserConfigExtension], -// }); -// this._languageService = new graphqlService.GraphQLLanguageService( -// new graphqlService.GraphQLCache( -// 'default/graphqlrc.yml', -// config as GraphQLConfig, -// ), -// ); -// return this._languageService; -// } - -// public getTokenAtPosition( -// documentString: string, -// position: Position, -// ): graphqlService.ContextToken { -// let styleAtCursor = null; -// let stateAtCursor = null; -// let stringAtCursor = null; -// const token = runOnlineParser( -// documentString, -// (stream, state, style, index) => { -// if (index === position.line) { -// if (stream.getCurrentPosition() >= position.character) { -// styleAtCursor = style; -// stateAtCursor = { ...state }; -// stringAtCursor = stream.current(); -// return 'BREAK'; -// } -// } -// }, -// ); - -// // Return the state/style of parsed token in case those at cursor aren't -// // available. -// return { -// start: token.start, -// end: token.end, -// string: stringAtCursor || token.string, -// state: stateAtCursor || token.state, -// style: styleAtCursor || token.style, -// }; -// } - -// async doValidation(uri: string): Promise { -// const ls = await this.getLanguageService(); -// const document = this._getQueryText(uri); - -// if (document) { -// const graphqlDiagnostics = await ls.getDiagnostics(document, uri); -// return graphqlDiagnostics.map(toMarkerData); -// } -// return Promise.resolve([]); -// } -// async doComplete( -// uri: string, -// position: monaco.Position, -// ): Promise { -// console.log('do compleat'); -// const ls = await this.getLanguageService(); -// const document = this._getQueryText(uri); -// console.log(document); -// const graphQLPosition = toGraphQLPosition(position); -// const suggestions = await ls.getAutocompleteSuggestions( -// document, -// graphQLPosition, -// uri, -// ); -// console.log({ suggestions }); - -// return suggestions.map(e => -// toCompletion( -// e, -// getRange( -// { column: graphQLPosition.character, line: graphQLPosition.line }, -// document, -// ), -// ), -// ); -// } - -// public async getSchema( -// projectName?: string, -// queryHasExtensions?: boolean, -// ): Promise { -// const ls = await this.getLanguageService(); -// this._schema = await ls.getSchema(projectName, queryHasExtensions); -// return this._schema; -// } - -// private _getTextDocument(uri: string): TextDocument | null { -// const models = this._ctx.getMirrorModels(); -// for (const model of models) { -// if (model.uri.toString() === uri) { -// return TextDocument.create( -// uri, -// this._languageId, -// model.version, -// model.getValue(), -// ); -// } -// } -// return null; -// } -// private _getQueryText(uri: string): string { -// return this._getTextDocument(uri)?.getText() as string; -// } -// } - -// export interface ICreateData { -// languageId: string; -// enableSchemaRequest: boolean; -// schemaUrl: String; -// } - -// export function create( -// ctx: IWorkerContext, -// createData: ICreateData, -// ): GraphQLWorker { -// console.log('CREATE WORKER'); -// return new GraphQLWorker(ctx, createData); -// } diff --git a/packages/monaco-graphql/src/languageFeatures.ts b/packages/monaco-graphql/src/languageFeatures.ts index 14e4407dfa1..eedb325074b 100644 --- a/packages/monaco-graphql/src/languageFeatures.ts +++ b/packages/monaco-graphql/src/languageFeatures.ts @@ -1,17 +1,25 @@ +/** + * Copyright (c) 2020 GraphQL Contributors. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import { GraphQLWorker } from './graphql.worker'; +import { LanguageServiceDefaultsImpl } from './defaults'; -import * as monaco from 'monaco-editor'; import { - CompletionItem as lsCompletionItem, - CompletionItemKind as lsCompletionItemKind, -} from 'vscode-languageserver-types'; - -import Uri = monaco.Uri; -import Position = monaco.Position; -import Thenable = monaco.Thenable; -import CancellationToken = monaco.CancellationToken; -import IDisposable = monaco.IDisposable; - + Uri, + Position, + Thenable, + CancellationToken, + IDisposable, + editor, + languages, + IRange, +} from 'monaco-editor'; +import { CompletionItemKind as lsCompletionItemKind } from 'vscode-languageserver-types'; +import { CompletionItem as GraphQLCompletionItem } from 'graphql-languageservice'; export interface WorkerAccessor { (...more: Uri[]): Thenable; } @@ -23,14 +31,13 @@ export class DiagnosticsAdapter { private _listener: { [uri: string]: IDisposable } = Object.create(null); constructor( - // @ts-ignore - private defaults: monaco.languages.graphql.LanguageServiceDefaultsImpl, + private defaults: LanguageServiceDefaultsImpl, private _worker: WorkerAccessor, ) { this._worker = _worker; - const onModelAdd = (model: monaco.editor.IModel): void => { + const onModelAdd = (model: editor.IModel): void => { const modeId = model.getModeId(); - if (modeId !== this.defaults._languageId) { + if (modeId !== this.defaults.languageId) { return; } @@ -44,8 +51,8 @@ export class DiagnosticsAdapter { this._doValidate(model.uri, modeId); }; - const onModelRemoved = (model: monaco.editor.IModel): void => { - monaco.editor.setModelMarkers(model, this.defaults._languageId, []); + const onModelRemoved = (model: editor.IModel): void => { + editor.setModelMarkers(model, this.defaults.languageId, []); const uriStr = model.uri.toString(); const listener = this._listener[uriStr]; if (listener) { @@ -54,14 +61,14 @@ export class DiagnosticsAdapter { } }; - this._disposables.push(monaco.editor.onDidCreateModel(onModelAdd)); + this._disposables.push(editor.onDidCreateModel(onModelAdd)); this._disposables.push( - monaco.editor.onWillDisposeModel(model => { + editor.onWillDisposeModel(model => { onModelRemoved(model); }), ); this._disposables.push( - monaco.editor.onDidChangeModelLanguage(event => { + editor.onDidChangeModelLanguage(event => { onModelRemoved(event.model); onModelAdd(event.model); }), @@ -69,8 +76,8 @@ export class DiagnosticsAdapter { this._disposables.push( defaults.onDidChange((_: any) => { - monaco.editor.getModels().forEach(model => { - if (model.getModeId() === this.defaults._languageId) { + editor.getModels().forEach(model => { + if (model.getModeId() === this.defaults.languageId) { onModelRemoved(model); onModelAdd(model); } @@ -86,7 +93,7 @@ export class DiagnosticsAdapter { }, }); - monaco.editor.getModels().forEach(onModelAdd); + editor.getModels().forEach(onModelAdd); } public dispose(): void { @@ -98,15 +105,15 @@ export class DiagnosticsAdapter { const worker = await this._worker(resource); const diagnostics = await worker.doValidation(resource.toString()); - monaco.editor.setModelMarkers( - monaco.editor.getModel(resource) as monaco.editor.ITextModel, + editor.setModelMarkers( + editor.getModel(resource) as editor.ITextModel, languageId, diagnostics, ); } } -const mKind = monaco.languages.CompletionItemKind; +const mKind = languages.CompletionItemKind; export function toCompletionItemKind(kind: lsCompletionItemKind) { switch (kind) { case lsCompletionItemKind.Text: @@ -165,9 +172,8 @@ export function toCompletionItemKind(kind: lsCompletionItemKind) { } export function toCompletion( - entry: lsCompletionItem & { range: monaco.IRange }, -): monaco.languages.CompletionItem { - // @ts-ignore + entry: GraphQLCompletionItem & { range: IRange }, +): languages.CompletionItem { return { label: entry.label, insertText: entry.insertText || (entry.label as string), @@ -180,8 +186,7 @@ export function toCompletion( }; } -export class CompletionAdapter - implements monaco.languages.CompletionItemProvider { +export class CompletionAdapter implements languages.CompletionItemProvider { constructor(private _worker: WorkerAccessor) { // this._worker = _worker } @@ -191,15 +196,14 @@ export class CompletionAdapter } async provideCompletionItems( - model: monaco.editor.IReadOnlyModel, + model: editor.IReadOnlyModel, position: Position, - _context: monaco.languages.CompletionContext, + _context: languages.CompletionContext, _token: CancellationToken, - ): Promise { + ): Promise { try { const resource = model.uri; const worker = await this._worker(model.uri); - // @ts-ignore const completionItems = await worker.doComplete( resource.toString(), position, @@ -215,22 +219,50 @@ export class CompletionAdapter } } -export class HoverAdapter implements monaco.languages.HoverProvider { +export class DocumentFormattingAdapter + implements languages.DocumentFormattingEditProvider { + constructor( + // private _defaults: LanguageServiceDefaultsImpl, + private _worker: WorkerAccessor, + ) { + // this._defaults = _defaults; + this._worker = _worker; + } + async provideDocumentFormattingEdits( + document: editor.ITextModel, + _options: languages.FormattingOptions, + _token: CancellationToken, + ) { + const worker = await this._worker(document.uri); + const text = document.getValue(); + + const formatted = await worker.doFormat( + text, + // this._defaults.modeConfiguration.formattingOptions, + ); + return [ + { + range: document.getFullModelRange(), + text: formatted, + }, + ]; + } +} + +export class HoverAdapter implements languages.HoverProvider { constructor(private _worker: WorkerAccessor) {} async provideHover( - model: monaco.editor.IReadOnlyModel, + model: editor.IReadOnlyModel, position: Position, _token: CancellationToken, - ): Promise { + ): Promise { const resource = model.uri; const worker = await this._worker(model.uri); - // @ts-ignore const hoverItem = await worker.doHover(resource.toString(), position); if (hoverItem) { - console.log(hoverItem.range); - return { + return { range: hoverItem.range, contents: [{ value: hoverItem.content }], }; diff --git a/packages/monaco-graphql/src/monaco.contribution.ts b/packages/monaco-graphql/src/monaco.contribution.ts index 0d0c34d1436..c6b718f3ace 100644 --- a/packages/monaco-graphql/src/monaco.contribution.ts +++ b/packages/monaco-graphql/src/monaco.contribution.ts @@ -1,98 +1,23 @@ -// / - -import * as monaco from 'monaco-editor'; +/** + * Copyright (c) 2020 GraphQL Contributors. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ import * as mode from './graphqlMode'; +import { + LanguageServiceDefaultsImpl, + diagnosticDefault, + modeConfigurationDefault, +} from './defaults'; -import Emitter = monaco.Emitter; -import IEvent = monaco.IEvent; +import * as monaco from 'monaco-editor'; // @ts-ignore export { language as monarchLanguage } from 'monaco-languages/release/esm/graphql/graphql'; export const LANGUAGE_ID = 'graphqlDev'; -// --- JSON configuration and defaults --------- - -export class LanguageServiceDefaultsImpl - implements - // @ts-ignore - monaco.languages.graphql.LanguageServiceDefaults { - private _onDidChange = new Emitter< - // @ts-ignore - monaco.languages.graphql.LanguageServiceDefaults - >(); - // @ts-ignore - private _diagnosticsOptions: monaco.languages.graphql.DiagnosticsOptions; - // @ts-ignore - private _modeConfiguration: monaco.languages.graphql.ModeConfiguration; - private _languageId: string; - - constructor( - languageId: string, - // @ts-ignore - diagnosticsOptions: monaco.languages.graphql.DiagnosticsOptions, - // @ts-ignore - modeConfiguration: monaco.languages.graphql.ModeConfiguration, - ) { - this._languageId = languageId; - this.setDiagnosticsOptions(diagnosticsOptions); - this.setModeConfiguration(modeConfiguration); - } - // @ts-ignore - get onDidChange(): IEvent { - return this._onDidChange.event; - } - - get languageId(): string { - return this._languageId; - } - // @ts-ignore - get modeConfiguration(): monaco.languages.graphql.ModeConfiguration { - return this._modeConfiguration; - } - // @ts-ignore - get diagnosticsOptions(): monaco.languages.graphql.DiagnosticsOptions { - return this._diagnosticsOptions; - } - - setDiagnosticsOptions( - // @ts-ignore - options: monaco.languages.graphql.DiagnosticsOptions, - ): void { - this._diagnosticsOptions = options || Object.create(null); - this._onDidChange.fire(this); - } - - setModeConfiguration( - // @ts-ignore - modeConfiguration: monaco.languages.graphql.ModeConfiguration, - ): void { - this._modeConfiguration = modeConfiguration || Object.create(null); - this._onDidChange.fire(this); - } -} - -// @ts-ignore -const diagnosticDefault: Required = { - validate: true, - allowComments: true, - schemas: [], - enableSchemaRequest: true, -}; - -// @ts-ignore -const modeConfigurationDefault: Required = { - documentFormattingEdits: false, - documentRangeFormattingEdits: false, - completionItems: true, - hovers: false, - documentSymbols: false, - tokens: false, - colors: false, - foldingRanges: false, - diagnostics: true, - selectionRanges: false, -}; monaco.languages.register({ id: LANGUAGE_ID, @@ -115,16 +40,13 @@ function createAPI() { } // @ts-ignore -monaco.languages[LANGUAGE_ID] = createAPI(); +monaco.languages.graphql = createAPI(); monaco.languages.onLanguage(LANGUAGE_ID, async () => { const graphqlMode = await getMode(); - // console.log('defaults', graphqlDefaults) graphqlMode.setupMode(graphqlDefaults); }); -// // // --- Registration to monaco editor --- - function getMode(): Promise { return import('./graphqlMode'); } diff --git a/packages/monaco-graphql/src/schema.ts b/packages/monaco-graphql/src/schema.ts deleted file mode 100644 index 9c59467d37b..00000000000 --- a/packages/monaco-graphql/src/schema.ts +++ /dev/null @@ -1,5030 +0,0 @@ -export default { - __schema: { - queryType: { name: 'Root' }, - mutationType: null, - subscriptionType: null, - types: [ - { - kind: 'OBJECT', - name: 'Root', - description: null, - fields: [ - { - name: 'allFilms', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'FilmsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'film', - description: null, - args: [ - { - name: 'id', - description: null, - type: { kind: 'SCALAR', name: 'ID', ofType: null }, - defaultValue: null, - }, - { - name: 'filmID', - description: null, - type: { kind: 'SCALAR', name: 'ID', ofType: null }, - defaultValue: null, - }, - ], - type: { kind: 'OBJECT', name: 'Film', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'allPeople', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'PeopleConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'person', - description: null, - args: [ - { - name: 'id', - description: null, - type: { kind: 'SCALAR', name: 'ID', ofType: null }, - defaultValue: null, - }, - { - name: 'personID', - description: null, - type: { kind: 'SCALAR', name: 'ID', ofType: null }, - defaultValue: null, - }, - ], - type: { kind: 'OBJECT', name: 'Person', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'allPlanets', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'PlanetsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'planet', - description: null, - args: [ - { - name: 'id', - description: null, - type: { kind: 'SCALAR', name: 'ID', ofType: null }, - defaultValue: null, - }, - { - name: 'planetID', - description: null, - type: { kind: 'SCALAR', name: 'ID', ofType: null }, - defaultValue: null, - }, - ], - type: { kind: 'OBJECT', name: 'Planet', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'allSpecies', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'SpeciesConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'species', - description: null, - args: [ - { - name: 'id', - description: null, - type: { kind: 'SCALAR', name: 'ID', ofType: null }, - defaultValue: null, - }, - { - name: 'speciesID', - description: null, - type: { kind: 'SCALAR', name: 'ID', ofType: null }, - defaultValue: null, - }, - ], - type: { kind: 'OBJECT', name: 'Species', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'allStarships', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'StarshipsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'starship', - description: null, - args: [ - { - name: 'id', - description: null, - type: { kind: 'SCALAR', name: 'ID', ofType: null }, - defaultValue: null, - }, - { - name: 'starshipID', - description: null, - type: { kind: 'SCALAR', name: 'ID', ofType: null }, - defaultValue: null, - }, - ], - type: { kind: 'OBJECT', name: 'Starship', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'allVehicles', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'VehiclesConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'vehicle', - description: null, - args: [ - { - name: 'id', - description: null, - type: { kind: 'SCALAR', name: 'ID', ofType: null }, - defaultValue: null, - }, - { - name: 'vehicleID', - description: null, - type: { kind: 'SCALAR', name: 'ID', ofType: null }, - defaultValue: null, - }, - ], - type: { kind: 'OBJECT', name: 'Vehicle', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'node', - description: 'Fetches an object given its ID', - args: [ - { - name: 'id', - description: 'The ID of an object', - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'ID', ofType: null }, - }, - defaultValue: null, - }, - ], - type: { kind: 'INTERFACE', name: 'Node', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'SCALAR', - name: 'String', - description: - 'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.', - fields: null, - inputFields: null, - interfaces: null, - enumValues: null, - possibleTypes: null, - }, - { - kind: 'SCALAR', - name: 'Int', - description: - 'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.', - fields: null, - inputFields: null, - interfaces: null, - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'FilmsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'FilmsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'films', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Film', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PageInfo', - description: 'Information about pagination in a connection.', - fields: [ - { - name: 'hasNextPage', - description: 'When paginating forwards, are there more items?', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'SCALAR', - name: 'Boolean', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'hasPreviousPage', - description: 'When paginating backwards, are there more items?', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'SCALAR', - name: 'Boolean', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'startCursor', - description: 'When paginating backwards, the cursor to continue.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'endCursor', - description: 'When paginating forwards, the cursor to continue.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'SCALAR', - name: 'Boolean', - description: 'The `Boolean` scalar type represents `true` or `false`.', - fields: null, - inputFields: null, - interfaces: null, - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'FilmsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Film', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'Film', - description: 'A single film.', - fields: [ - { - name: 'title', - description: 'The title of this film.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'episodeID', - description: 'The episode number of this film.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'openingCrawl', - description: - 'The opening paragraphs at the beginning of this film.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'director', - description: 'The name of the director of this film.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'producers', - description: 'The name(s) of the producer(s) of this film.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'releaseDate', - description: - 'The ISO 8601 date format of film release at original creator country.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'speciesConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'FilmSpeciesConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'starshipConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'FilmStarshipsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'vehicleConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'FilmVehiclesConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'characterConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'FilmCharactersConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'planetConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'FilmPlanetsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'created', - description: - 'The ISO 8601 date format of the time that this resource was created.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edited', - description: - 'The ISO 8601 date format of the time that this resource was edited.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'id', - description: 'The ID of an object', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'ID', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [{ kind: 'INTERFACE', name: 'Node', ofType: null }], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'INTERFACE', - name: 'Node', - description: 'An object with an ID', - fields: [ - { - name: 'id', - description: 'The id of the object.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'ID', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: null, - enumValues: null, - possibleTypes: [ - { kind: 'OBJECT', name: 'Film', ofType: null }, - { kind: 'OBJECT', name: 'Species', ofType: null }, - { kind: 'OBJECT', name: 'Planet', ofType: null }, - { kind: 'OBJECT', name: 'Person', ofType: null }, - { kind: 'OBJECT', name: 'Starship', ofType: null }, - { kind: 'OBJECT', name: 'Vehicle', ofType: null }, - ], - }, - { - kind: 'SCALAR', - name: 'ID', - description: - 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.', - fields: null, - inputFields: null, - interfaces: null, - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'FilmSpeciesConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'FilmSpeciesEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'species', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'Species', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'FilmSpeciesEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Species', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'Species', - description: - 'A type of person or character within the Star Wars Universe.', - fields: [ - { - name: 'name', - description: 'The name of this species.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'classification', - description: - 'The classification of this species, such as "mammal" or "reptile".', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'designation', - description: 'The designation of this species, such as "sentient".', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'averageHeight', - description: 'The average height of this species in centimeters.', - args: [], - type: { kind: 'SCALAR', name: 'Float', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'averageLifespan', - description: - 'The average lifespan of this species in years, null if unknown.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'eyeColors', - description: - 'Common eye colors for this species, null if this species does not typically\nhave eyes.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'hairColors', - description: - 'Common hair colors for this species, null if this species does not typically\nhave hair.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'skinColors', - description: - 'Common skin colors for this species, null if this species does not typically\nhave skin.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'language', - description: 'The language commonly spoken by this species.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'homeworld', - description: 'A planet that this species originates from.', - args: [], - type: { kind: 'OBJECT', name: 'Planet', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'personConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'SpeciesPeopleConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'filmConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'SpeciesFilmsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'created', - description: - 'The ISO 8601 date format of the time that this resource was created.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edited', - description: - 'The ISO 8601 date format of the time that this resource was edited.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'id', - description: 'The ID of an object', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'ID', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [{ kind: 'INTERFACE', name: 'Node', ofType: null }], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'SCALAR', - name: 'Float', - description: - 'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).', - fields: null, - inputFields: null, - interfaces: null, - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'Planet', - description: - 'A large mass, planet or planetoid in the Star Wars Universe, at the time of\n0 ABY.', - fields: [ - { - name: 'name', - description: 'The name of this planet.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'diameter', - description: 'The diameter of this planet in kilometers.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'rotationPeriod', - description: - 'The number of standard hours it takes for this planet to complete a single\nrotation on its axis.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'orbitalPeriod', - description: - 'The number of standard days it takes for this planet to complete a single orbit\nof its local star.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'gravity', - description: - 'A number denoting the gravity of this planet, where "1" is normal or 1 standard\nG. "2" is twice or 2 standard Gs. "0.5" is half or 0.5 standard Gs.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'population', - description: - 'The average population of sentient beings inhabiting this planet.', - args: [], - type: { kind: 'SCALAR', name: 'Float', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'climates', - description: 'The climates of this planet.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'terrains', - description: 'The terrains of this planet.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'surfaceWater', - description: - 'The percentage of the planet surface that is naturally occuring water or bodies\nof water.', - args: [], - type: { kind: 'SCALAR', name: 'Float', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'residentConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'PlanetResidentsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'filmConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'PlanetFilmsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'created', - description: - 'The ISO 8601 date format of the time that this resource was created.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edited', - description: - 'The ISO 8601 date format of the time that this resource was edited.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'id', - description: 'The ID of an object', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'ID', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [{ kind: 'INTERFACE', name: 'Node', ofType: null }], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PlanetResidentsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PlanetResidentsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'residents', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Person', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PlanetResidentsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Person', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'Person', - description: - 'An individual person or character within the Star Wars universe.', - fields: [ - { - name: 'name', - description: 'The name of this person.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'birthYear', - description: - 'The birth year of the person, using the in-universe standard of BBY or ABY -\nBefore the Battle of Yavin or After the Battle of Yavin. The Battle of Yavin is\na battle that occurs at the end of Star Wars episode IV: A New Hope.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'eyeColor', - description: - 'The eye color of this person. Will be "unknown" if not known or "n/a" if the\nperson does not have an eye.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'gender', - description: - 'The gender of this person. Either "Male", "Female" or "unknown",\n"n/a" if the person does not have a gender.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'hairColor', - description: - 'The hair color of this person. Will be "unknown" if not known or "n/a" if the\nperson does not have hair.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'height', - description: 'The height of the person in centimeters.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'mass', - description: 'The mass of the person in kilograms.', - args: [], - type: { kind: 'SCALAR', name: 'Float', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'skinColor', - description: 'The skin color of this person.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'homeworld', - description: 'A planet that this person was born on or inhabits.', - args: [], - type: { kind: 'OBJECT', name: 'Planet', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'filmConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'PersonFilmsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'species', - description: - 'The species that this person belongs to, or null if unknown.', - args: [], - type: { kind: 'OBJECT', name: 'Species', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'starshipConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'PersonStarshipsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'vehicleConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'PersonVehiclesConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'created', - description: - 'The ISO 8601 date format of the time that this resource was created.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edited', - description: - 'The ISO 8601 date format of the time that this resource was edited.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'id', - description: 'The ID of an object', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'ID', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [{ kind: 'INTERFACE', name: 'Node', ofType: null }], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PersonFilmsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PersonFilmsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'films', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Film', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PersonFilmsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Film', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PersonStarshipsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PersonStarshipsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'starships', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'Starship', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PersonStarshipsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Starship', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'Starship', - description: 'A single transport craft that has hyperdrive capability.', - fields: [ - { - name: 'name', - description: - 'The name of this starship. The common name, such as "Death Star".', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'model', - description: - 'The model or official name of this starship. Such as "T-65 X-wing" or "DS-1\nOrbital Battle Station".', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'starshipClass', - description: - 'The class of this starship, such as "Starfighter" or "Deep Space Mobile\nBattlestation"', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'manufacturers', - description: 'The manufacturers of this starship.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'costInCredits', - description: 'The cost of this starship new, in galactic credits.', - args: [], - type: { kind: 'SCALAR', name: 'Float', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'length', - description: 'The length of this starship in meters.', - args: [], - type: { kind: 'SCALAR', name: 'Float', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'crew', - description: - 'The number of personnel needed to run or pilot this starship.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'passengers', - description: - 'The number of non-essential people this starship can transport.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'maxAtmospheringSpeed', - description: - 'The maximum speed of this starship in atmosphere. null if this starship is\nincapable of atmosphering flight.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'hyperdriveRating', - description: 'The class of this starships hyperdrive.', - args: [], - type: { kind: 'SCALAR', name: 'Float', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'MGLT', - description: - 'The Maximum number of Megalights this starship can travel in a standard hour.\nA "Megalight" is a standard unit of distance and has never been defined before\nwithin the Star Wars universe. This figure is only really useful for measuring\nthe difference in speed of starships. We can assume it is similar to AU, the\ndistance between our Sun (Sol) and Earth.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cargoCapacity', - description: - 'The maximum number of kilograms that this starship can transport.', - args: [], - type: { kind: 'SCALAR', name: 'Float', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'consumables', - description: - 'The maximum length of time that this starship can provide consumables for its\nentire crew without having to resupply.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'pilotConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'StarshipPilotsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'filmConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'StarshipFilmsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'created', - description: - 'The ISO 8601 date format of the time that this resource was created.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edited', - description: - 'The ISO 8601 date format of the time that this resource was edited.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'id', - description: 'The ID of an object', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'ID', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [{ kind: 'INTERFACE', name: 'Node', ofType: null }], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'StarshipPilotsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'StarshipPilotsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'pilots', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Person', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'StarshipPilotsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Person', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'StarshipFilmsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'StarshipFilmsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'films', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Film', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'StarshipFilmsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Film', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PersonVehiclesConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PersonVehiclesEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'vehicles', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'Vehicle', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PersonVehiclesEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Vehicle', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'Vehicle', - description: - 'A single transport craft that does not have hyperdrive capability', - fields: [ - { - name: 'name', - description: - 'The name of this vehicle. The common name, such as "Sand Crawler" or "Speeder\nbike".', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'model', - description: - 'The model or official name of this vehicle. Such as "All-Terrain Attack\nTransport".', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'vehicleClass', - description: - 'The class of this vehicle, such as "Wheeled" or "Repulsorcraft".', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'manufacturers', - description: 'The manufacturers of this vehicle.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'costInCredits', - description: 'The cost of this vehicle new, in Galactic Credits.', - args: [], - type: { kind: 'SCALAR', name: 'Float', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'length', - description: 'The length of this vehicle in meters.', - args: [], - type: { kind: 'SCALAR', name: 'Float', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'crew', - description: - 'The number of personnel needed to run or pilot this vehicle.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'passengers', - description: - 'The number of non-essential people this vehicle can transport.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'maxAtmospheringSpeed', - description: 'The maximum speed of this vehicle in atmosphere.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cargoCapacity', - description: - 'The maximum number of kilograms that this vehicle can transport.', - args: [], - type: { kind: 'SCALAR', name: 'Float', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'consumables', - description: - 'The maximum length of time that this vehicle can provide consumables for its\nentire crew without having to resupply.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'pilotConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'VehiclePilotsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'filmConnection', - description: null, - args: [ - { - name: 'after', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'first', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - { - name: 'before', - description: null, - type: { - kind: 'SCALAR', - name: 'String', - ofType: null, - }, - defaultValue: null, - }, - { - name: 'last', - description: null, - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - defaultValue: null, - }, - ], - type: { - kind: 'OBJECT', - name: 'VehicleFilmsConnection', - ofType: null, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'created', - description: - 'The ISO 8601 date format of the time that this resource was created.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edited', - description: - 'The ISO 8601 date format of the time that this resource was edited.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'id', - description: 'The ID of an object', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'ID', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [{ kind: 'INTERFACE', name: 'Node', ofType: null }], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'VehiclePilotsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'VehiclePilotsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'pilots', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Person', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'VehiclePilotsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Person', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'VehicleFilmsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'VehicleFilmsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'films', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Film', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'VehicleFilmsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Film', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PlanetFilmsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PlanetFilmsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'films', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Film', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PlanetFilmsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Film', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'SpeciesPeopleConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'SpeciesPeopleEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'people', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Person', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'SpeciesPeopleEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Person', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'SpeciesFilmsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'SpeciesFilmsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'films', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Film', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'SpeciesFilmsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Film', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'FilmStarshipsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'FilmStarshipsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'starships', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'Starship', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'FilmStarshipsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Starship', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'FilmVehiclesConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'FilmVehiclesEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'vehicles', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'Vehicle', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'FilmVehiclesEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Vehicle', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'FilmCharactersConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'FilmCharactersEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'characters', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Person', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'FilmCharactersEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Person', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'FilmPlanetsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'FilmPlanetsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'planets', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Planet', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'FilmPlanetsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Planet', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PeopleConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PeopleEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'people', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Person', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PeopleEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Person', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PlanetsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PlanetsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'planets', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { kind: 'OBJECT', name: 'Planet', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'PlanetsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Planet', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'SpeciesConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'SpeciesEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'species', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'Species', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'SpeciesEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Species', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'StarshipsConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'StarshipsEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'starships', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'Starship', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'StarshipsEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Starship', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'VehiclesConnection', - description: 'A connection to a list of items.', - fields: [ - { - name: 'pageInfo', - description: 'Information to aid in pagination.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'edges', - description: 'A list of edges.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'VehiclesEdge', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'totalCount', - description: - 'A count of the total number of objects in this connection, ignoring pagination.\nThis allows a client to fetch the first five objects by passing "5" as the\nargument to "first", then fetch the total count so it could display "5 of 83",\nfor example.', - args: [], - type: { kind: 'SCALAR', name: 'Int', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'vehicles', - description: - 'A list of all of the objects returned in the connection. This is a convenience\nfield provided for quickly exploring the API; rather than querying for\n"{ edges { node } }" when no edge data is needed, this field can be be used\ninstead. Note that when clients like Relay need to fetch the "cursor" field on\nthe edge to enable efficient pagination, this shortcut cannot be used, and the\nfull "{ edges { node } }" version should be used instead.', - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'OBJECT', - name: 'Vehicle', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: 'VehiclesEdge', - description: 'An edge in a connection.', - fields: [ - { - name: 'node', - description: 'The item at the end of the edge', - args: [], - type: { kind: 'OBJECT', name: 'Vehicle', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'cursor', - description: 'A cursor for use in pagination', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: '__Schema', - description: - 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.', - fields: [ - { - name: 'types', - description: 'A list of all types supported by this server.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'LIST', - name: null, - ofType: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: '__Type', - ofType: null, - }, - }, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'queryType', - description: 'The type that query operations will be rooted at.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'OBJECT', name: '__Type', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'mutationType', - description: - 'If this server supports mutation, the type that mutation operations will be rooted at.', - args: [], - type: { kind: 'OBJECT', name: '__Type', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'subscriptionType', - description: - 'If this server support subscription, the type that subscription operations will be rooted at.', - args: [], - type: { kind: 'OBJECT', name: '__Type', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'directives', - description: 'A list of all directives supported by this server.', - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'LIST', - name: null, - ofType: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: '__Directive', - ofType: null, - }, - }, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: '__Type', - description: - 'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.', - fields: [ - { - name: 'kind', - description: null, - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'ENUM', - name: '__TypeKind', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'name', - description: null, - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'description', - description: null, - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'fields', - description: null, - args: [ - { - name: 'includeDeprecated', - description: null, - type: { - kind: 'SCALAR', - name: 'Boolean', - ofType: null, - }, - defaultValue: 'false', - }, - ], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: '__Field', - ofType: null, - }, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'interfaces', - description: null, - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: '__Type', - ofType: null, - }, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'possibleTypes', - description: null, - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: '__Type', - ofType: null, - }, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'enumValues', - description: null, - args: [ - { - name: 'includeDeprecated', - description: null, - type: { - kind: 'SCALAR', - name: 'Boolean', - ofType: null, - }, - defaultValue: 'false', - }, - ], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: '__EnumValue', - ofType: null, - }, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'inputFields', - description: null, - args: [], - type: { - kind: 'LIST', - name: null, - ofType: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: '__InputValue', - ofType: null, - }, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'ofType', - description: null, - args: [], - type: { kind: 'OBJECT', name: '__Type', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'ENUM', - name: '__TypeKind', - description: - 'An enum describing what kind of type a given `__Type` is.', - fields: null, - inputFields: null, - interfaces: null, - enumValues: [ - { - name: 'SCALAR', - description: 'Indicates this type is a scalar.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'OBJECT', - description: - 'Indicates this type is an object. `fields` and `interfaces` are valid fields.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'INTERFACE', - description: - 'Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'UNION', - description: - 'Indicates this type is a union. `possibleTypes` is a valid field.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'ENUM', - description: - 'Indicates this type is an enum. `enumValues` is a valid field.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'INPUT_OBJECT', - description: - 'Indicates this type is an input object. `inputFields` is a valid field.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'LIST', - description: - 'Indicates this type is a list. `ofType` is a valid field.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'NON_NULL', - description: - 'Indicates this type is a non-null. `ofType` is a valid field.', - isDeprecated: false, - deprecationReason: null, - }, - ], - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: '__Field', - description: - 'Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.', - fields: [ - { - name: 'name', - description: null, - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'description', - description: null, - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'args', - description: null, - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'LIST', - name: null, - ofType: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: '__InputValue', - ofType: null, - }, - }, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'type', - description: null, - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'OBJECT', name: '__Type', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'isDeprecated', - description: null, - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'SCALAR', - name: 'Boolean', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'deprecationReason', - description: null, - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: '__InputValue', - description: - 'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.', - fields: [ - { - name: 'name', - description: null, - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'description', - description: null, - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'type', - description: null, - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'OBJECT', name: '__Type', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'defaultValue', - description: - 'A GraphQL-formatted string representing the default value for this input value.', - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: '__EnumValue', - description: - 'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.', - fields: [ - { - name: 'name', - description: null, - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'description', - description: null, - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'isDeprecated', - description: null, - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'SCALAR', - name: 'Boolean', - ofType: null, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'deprecationReason', - description: null, - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'OBJECT', - name: '__Directive', - description: - "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", - fields: [ - { - name: 'name', - description: null, - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { kind: 'SCALAR', name: 'String', ofType: null }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'description', - description: null, - args: [], - type: { kind: 'SCALAR', name: 'String', ofType: null }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'locations', - description: null, - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'LIST', - name: null, - ofType: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'ENUM', - name: '__DirectiveLocation', - ofType: null, - }, - }, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'args', - description: null, - args: [], - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'LIST', - name: null, - ofType: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'OBJECT', - name: '__InputValue', - ofType: null, - }, - }, - }, - }, - isDeprecated: false, - deprecationReason: null, - }, - ], - inputFields: null, - interfaces: [], - enumValues: null, - possibleTypes: null, - }, - { - kind: 'ENUM', - name: '__DirectiveLocation', - description: - 'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.', - fields: null, - inputFields: null, - interfaces: null, - enumValues: [ - { - name: 'QUERY', - description: 'Location adjacent to a query operation.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'MUTATION', - description: 'Location adjacent to a mutation operation.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'SUBSCRIPTION', - description: 'Location adjacent to a subscription operation.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'FIELD', - description: 'Location adjacent to a field.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'FRAGMENT_DEFINITION', - description: 'Location adjacent to a fragment definition.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'FRAGMENT_SPREAD', - description: 'Location adjacent to a fragment spread.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'INLINE_FRAGMENT', - description: 'Location adjacent to an inline fragment.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'VARIABLE_DEFINITION', - description: 'Location adjacent to a variable definition.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'SCHEMA', - description: 'Location adjacent to a schema definition.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'SCALAR', - description: 'Location adjacent to a scalar definition.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'OBJECT', - description: 'Location adjacent to an object type definition.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'FIELD_DEFINITION', - description: 'Location adjacent to a field definition.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'ARGUMENT_DEFINITION', - description: 'Location adjacent to an argument definition.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'INTERFACE', - description: 'Location adjacent to an interface definition.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'UNION', - description: 'Location adjacent to a union definition.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'ENUM', - description: 'Location adjacent to an enum definition.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'ENUM_VALUE', - description: 'Location adjacent to an enum value definition.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'INPUT_OBJECT', - description: - 'Location adjacent to an input object type definition.', - isDeprecated: false, - deprecationReason: null, - }, - { - name: 'INPUT_FIELD_DEFINITION', - description: - 'Location adjacent to an input object field definition.', - isDeprecated: false, - deprecationReason: null, - }, - ], - possibleTypes: null, - }, - ], - directives: [ - { - name: 'include', - description: - 'Directs the executor to include this field or fragment only when the `if` argument is true.', - locations: ['FIELD', 'FRAGMENT_SPREAD', 'INLINE_FRAGMENT'], - args: [ - { - name: 'if', - description: 'Included when true.', - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'SCALAR', - name: 'Boolean', - ofType: null, - }, - }, - defaultValue: null, - }, - ], - }, - { - name: 'skip', - description: - 'Directs the executor to skip this field or fragment when the `if` argument is true.', - locations: ['FIELD', 'FRAGMENT_SPREAD', 'INLINE_FRAGMENT'], - args: [ - { - name: 'if', - description: 'Skipped when true.', - type: { - kind: 'NON_NULL', - name: null, - ofType: { - kind: 'SCALAR', - name: 'Boolean', - ofType: null, - }, - }, - defaultValue: null, - }, - ], - }, - { - name: 'deprecated', - description: - 'Marks an element of a GraphQL schema as no longer supported.', - locations: ['FIELD_DEFINITION', 'ENUM_VALUE'], - args: [ - { - name: 'reason', - description: - 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax (as specified by [CommonMark](https://commonmark.org/).', - type: { kind: 'SCALAR', name: 'String', ofType: null }, - defaultValue: '"No longer supported"', - }, - ], - }, - ], - }, -}; diff --git a/packages/monaco-graphql/src/monaco.d.ts b/packages/monaco-graphql/src/typings/monaco.d.ts similarity index 88% rename from packages/monaco-graphql/src/monaco.d.ts rename to packages/monaco-graphql/src/typings/monaco.d.ts index 44303b1892b..14ddd9ee6ba 100644 --- a/packages/monaco-graphql/src/monaco.d.ts +++ b/packages/monaco-graphql/src/typings/monaco.d.ts @@ -1,5 +1,9 @@ -// / - +/** + * Copyright (c) 2020 GraphQL Contributors. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ declare module monaco.languages.graphql { export interface IDisposable { dispose(): void; @@ -17,14 +21,19 @@ declare module monaco.languages.graphql { * If set, comments are tolerated. If set to false, syntax errors will be emitted for comments. */ readonly allowComments?: boolean; + + /** + * we'll just use this for now + */ + readonly schemaUri: string; /** * A list of known schemas and/or associations of schemas to file names. */ - readonly schemas?: { + readonly schemas?: Array<{ /** * The URI of the schema, which is also the identifier of the schema. */ - readonly uri: string; + readonly uri?: string; /** * A list of file names that are associated to the schema. The '*' wildcard can be used. For example '*.schema.json', 'package.json' */ @@ -33,7 +42,7 @@ declare module monaco.languages.graphql { * The schema for the given URI. */ readonly schema?: any; - }[]; + }>; /** * If set, the schema service would load schema content on-demand with 'fetch' if available */ @@ -100,7 +109,7 @@ declare module monaco.languages.graphql { setModeConfiguration(modeConfiguration: ModeConfiguration): void; } - export const graphqlDefaults: LanguageServiceDefaults; + // export const graphqlDefaults: LanguageServiceDefaults; } // declare module ''monaco-editor-core/esm/vs/editor/editor.worker'; diff --git a/packages/monaco-graphql/src/typings/refs.d.ts b/packages/monaco-graphql/src/typings/refs.d.ts index d5632995156..0abc43d226e 100644 --- a/packages/monaco-graphql/src/typings/refs.d.ts +++ b/packages/monaco-graphql/src/typings/refs.d.ts @@ -1 +1,2 @@ -// / +// / +// / diff --git a/packages/monaco-graphql/src/utils.ts b/packages/monaco-graphql/src/utils.ts index f0ff99f80e5..342b7440c42 100644 --- a/packages/monaco-graphql/src/utils.ts +++ b/packages/monaco-graphql/src/utils.ts @@ -1,41 +1,58 @@ +/** + * Copyright (c) 2020 GraphQL Contributors. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import * as monaco from 'monaco-editor'; -import { Diagnostic } from 'graphql-languageservice'; import { - Position as PositionType, - CompletionItem as CompletionItemType, -} from 'vscode-languageserver-types'; + Range as GraphQLRange, + Position as GraphQLPosition, +} from 'graphql-language-service-types'; + +export interface ICreateData { + languageId: string; + enableSchemaRequest: boolean; + schemaUrl: String; +} +import { + Diagnostic, + CompletionItem as GraphQLCompletionItem, +} from 'graphql-languageservice'; -export type CompletionItem = CompletionItemType & { +export type MonacoCompletionItem = monaco.languages.CompletionItem & { isDeprecated?: boolean; deprecationReason?: string | null; }; -// online-parser related -export type Position = PositionType & { - line: number; - character: number; - lessThanOrEqualTo?: (position: Position) => boolean; -}; - -export interface Range { - start: Position; - end: Position; - containsPosition: (position: Position) => boolean; +export function toMonacoRange(range: GraphQLRange): monaco.IRange { + return { + startLineNumber: range.start.line + 1, + startColumn: range.start.character + 1, + endLineNumber: range.end.line + 1, + endColumn: range.end.character + 1, + }; } -export interface Range { - start: Position; - end: Position; - containsPosition: (position: Position) => boolean; +export function toGraphQLPosition(position: monaco.Position): GraphQLPosition { + return { line: position.lineNumber - 1, character: position.column - 1 }; } -export function toRange(range: Range): monaco.IRange { - return new monaco.Range( - range.start.line + 1, - range.start.character + 1, - range.end.line + 1, - range.end.character + 1, - ); +export function toCompletion( + entry: GraphQLCompletionItem, + range: GraphQLRange, +): GraphQLCompletionItem & { range: monaco.IRange } { + return { + label: entry.label, + insertText: entry.insertText || (entry.label as string), + sortText: entry.sortText, + filterText: entry.filterText, + documentation: entry.documentation, + detail: entry.detail, + range: toMonacoRange(range), + kind: entry.kind, + }; } export function toMarkerData( @@ -47,56 +64,7 @@ export function toMarkerData( startColumn: diagnostic.range.start.character + 1, endColumn: diagnostic.range.end.character + 1, message: diagnostic.message, - severity: diagnostic.severity as monaco.MarkerSeverity, + severity: 5 || (diagnostic.severity as monaco.MarkerSeverity), code: (diagnostic.code as string) || undefined, }; } - -export function toCompletion( - entry: CompletionItem, - range: Range, -): monaco.languages.CompletionItem { - return { - label: entry.label, - insertText: entry.insertText || entry.label, - sortText: entry.sortText, - filterText: entry.filterText, - documentation: entry.documentation, - detail: entry.detail, - range: toRange(range), - kind: entry.kind as monaco.languages.CompletionItemKind, - }; -} - -// export function toGraphQLPosition(position: monaco.Position): Position { -// return { -// line: position.lineNumber - 1, -// character: position.column - 1, -// }; -// } - -export function fromPosition(position: monaco.Position): Position | void { - if (!position) { - return; - } - return { character: position.column - 1, line: position.lineNumber - 1 }; -} - -// export function fromRange(range: monaco.IRange): Range | void { -// if (!range) { -// return; -// } -// return { -// start: { -// line: range.startLineNumber - 1, -// character: range.startColumn - 1, -// }, -// end: { line: range.endLineNumber - 1, character: range.endColumn - 1 }, -// containsPosition: pos => { -// return monaco.Range.containsPosition(range, { -// lineNumber: pos.line, -// column: pos.character, -// }); -// }, -// }; -// } diff --git a/packages/monaco-graphql/src/workerManager.ts b/packages/monaco-graphql/src/workerManager.ts index 234611118fb..33d068edae6 100644 --- a/packages/monaco-graphql/src/workerManager.ts +++ b/packages/monaco-graphql/src/workerManager.ts @@ -1,5 +1,12 @@ +/** + * Copyright (c) 2020 GraphQL Contributors. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + import * as monaco from 'monaco-editor'; -import { LanguageServiceDefaultsImpl } from './monaco.contribution'; +import { LanguageServiceDefaultsImpl } from './defaults'; import { GraphQLWorker } from './graphql.worker'; import IDisposable = monaco.IDisposable; @@ -69,6 +76,7 @@ export class WorkerManager { languageId: this._defaults.languageId, enableSchemaRequest: this._defaults.diagnosticsOptions .enableSchemaRequest, + schemaUrl: this._defaults.diagnosticsOptions.schemaUri, }, }); this._client = await this._worker.getProxy(); diff --git a/packages/monaco-graphql/tsconfig.esm.json b/packages/monaco-graphql/tsconfig.esm.json index 3e1faa6ed5e..9ad009592c7 100644 --- a/packages/monaco-graphql/tsconfig.esm.json +++ b/packages/monaco-graphql/tsconfig.esm.json @@ -16,7 +16,10 @@ "ES2017", "ES2018", "ESNext" - ] + ], + "paths": { + "*": ["*"] + } }, "references": [ { diff --git a/packages/monaco-graphql/tsconfig.json b/packages/monaco-graphql/tsconfig.json index 5c39964ca56..3b8b8ab25bd 100644 --- a/packages/monaco-graphql/tsconfig.json +++ b/packages/monaco-graphql/tsconfig.json @@ -14,7 +14,10 @@ "es2015.promise", "es2015.iterable", "es6" - ] + ], + "paths": { + "*": ["*"] + } }, "references": [ { diff --git a/resources/pretty.js b/resources/pretty.js index e5173e8cece..f9207ec707d 100755 --- a/resources/pretty.js +++ b/resources/pretty.js @@ -62,6 +62,6 @@ if (status) { } } if (error) { - print('error', error); + print(error); } process.exit(status != null ? status : 1); diff --git a/resources/tsconfig.base.cjs.json b/resources/tsconfig.base.cjs.json index 70086e5b057..72cf1b0a6ff 100644 --- a/resources/tsconfig.base.cjs.json +++ b/resources/tsconfig.base.cjs.json @@ -17,6 +17,7 @@ "noFallthroughCasesInSwitch": true, "noUnusedParameters": true, "noUnusedLocals": true, + "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "lib": ["dom", "es2017", "esnext"], "types": ["node", "jest"], diff --git a/yarn.lock b/yarn.lock index 81c181ec790..6740dd156b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -63,17 +63,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.4.0": - version "7.9.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.4.tgz#12441e90c3b3c4159cdecf312075bf1a8ce2dbce" - integrity sha512-rjP8ahaDy/ouhrvCoU1E5mqaitWrxwuNGU+dy1EpaoK48jZay4MdkskKGIMHLZNewg8sAsqpGSREJwP0zH3YQA== - dependencies: - "@babel/types" "^7.9.0" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.5.0" - -"@babel/generator@^7.8.4", "@babel/generator@^7.9.0": +"@babel/generator@^7.4.0", "@babel/generator@^7.9.0", "@babel/generator@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.5.tgz#27f0917741acc41e6eaaced6d68f96c3fa9afaf9" integrity sha512-GbNIxVB3ZJe3tLeDm1HSn2AhuD/mVcyLDpgtLXa5tplmWrJdF/elxB56XNqCuD6szyNkDi6wuoKXln3QeBmCHQ== @@ -126,7 +116,7 @@ levenary "^1.1.1" semver "^5.5.0" -"@babel/helper-create-class-features-plugin@^7.7.4", "@babel/helper-create-class-features-plugin@^7.8.3": +"@babel/helper-create-class-features-plugin@^7.8.3": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.6.tgz#243a5b46e2f8f0f674dc1387631eb6b28b851de0" integrity sha512-klTBDdsr+VFFqaDHm5rR69OpEQtO2Qv8ECxHS1mNhJJvaHArR6a1xTf5K/eZW7eZpJbhCx3NW1Yt/sKsLXLblg== @@ -321,21 +311,11 @@ resolve "^1.13.1" v8flags "^3.1.1" -"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.5", "@babel/parser@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8" - integrity sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw== - -"@babel/parser@^7.7.0", "@babel/parser@^7.8.3", "@babel/parser@^7.8.6": +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": version "7.9.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== -"@babel/parser@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.0.tgz#f821b32313f07ee570976d3f6238e8d2d66e0a8e" - integrity sha512-Iwyp00CZsypoNJcpXCbq3G4tcDgphtlMwMVrMhhZ//XBkqjXF7LW6V511yk0+pBX3ZwwGnPea+pTKNJiqA7pUg== - "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz#bad329c670b382589721b27540c7d288601c6e6f" @@ -345,15 +325,7 @@ "@babel/helper-remap-async-to-generator" "^7.8.3" "@babel/plugin-syntax-async-generators" "^7.8.0" -"@babel/plugin-proposal-class-properties@7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.7.4.tgz#2f964f0cb18b948450362742e33e15211e77c2ba" - integrity sha512-EcuXeV4Hv1X3+Q1TsuOmyyxeTRiSqurGJ26+I/FW1WbymmRRapVORm6x1Zl3iDIHyRxEs+VXWp6qnlcfcJSbbw== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.7.4" - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-proposal-class-properties@^7.7.0", "@babel/plugin-proposal-class-properties@^7.8.3": +"@babel/plugin-proposal-class-properties@7.8.3", "@babel/plugin-proposal-class-properties@^7.7.0", "@babel/plugin-proposal-class-properties@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz#5e06654af5cd04b608915aada9b2a6788004464e" integrity sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA== @@ -393,15 +365,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-numeric-separator" "^7.8.3" -"@babel/plugin-proposal-object-rest-spread@^7.6.2", "@babel/plugin-proposal-object-rest-spread@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.0.tgz#a28993699fc13df165995362693962ba6b061d6f" - integrity sha512-UgqBv6bjq4fDb8uku9f+wcm1J7YxJ5nT7WO/jBr0cl0PLKb7t1O6RNR1kZbjgx2LQtsDI9hwoQVmn0yhXeQyow== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.0" - -"@babel/plugin-proposal-object-rest-spread@^7.9.5": +"@babel/plugin-proposal-object-rest-spread@^7.6.2", "@babel/plugin-proposal-object-rest-spread@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.5.tgz#3fd65911306d8746014ec0d0cf78f0e39a149116" integrity sha512-VP2oXvAf7KCYTthbUHwBlewbl1Iq059f6seJGsxMizaCdgHIeczOr7FBqELhSqfkIl04Fi8okzWzl63UKbQmmg== @@ -426,7 +390,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.0" -"@babel/plugin-proposal-unicode-property-regex@^7.4.4": +"@babel/plugin-proposal-unicode-property-regex@^7.4.4", "@babel/plugin-proposal-unicode-property-regex@^7.8.3": version "7.8.8" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz#ee3a95e90cdc04fe8cd92ec3279fa017d68a0d1d" integrity sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A== @@ -434,14 +398,6 @@ "@babel/helper-create-regexp-features-plugin" "^7.8.8" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-proposal-unicode-property-regex@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz#b646c3adea5f98800c9ab45105ac34d06cd4a47f" - integrity sha512-1/1/rEZv2XGweRwwSkLpY+s60za9OZ1hJs4YDqFHCw0kYWYwL5IFljVY1MYBL+weT1l9pokDO2uhSTLVxzoHkQ== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-syntax-async-generators@^7.8.0", "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -578,20 +534,6 @@ "@babel/helper-plugin-utils" "^7.8.3" lodash "^4.17.13" -"@babel/plugin-transform-classes@^7.9.0": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.2.tgz#8603fc3cc449e31fdbdbc257f67717536a11af8d" - integrity sha512-TC2p3bPzsfvSsqBZo0kJnuelnoK9O3welkUpqSqBQuBF6R5MN2rysopri8kNvtlGIb2jmUO7i15IooAZJjZuMQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.8.3" - "@babel/helper-define-map" "^7.8.3" - "@babel/helper-function-name" "^7.8.3" - "@babel/helper-optimise-call-expression" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-replace-supers" "^7.8.6" - "@babel/helper-split-export-declaration" "^7.8.3" - globals "^11.1.0" - "@babel/plugin-transform-classes@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.5.tgz#800597ddb8aefc2c293ed27459c1fcc935a26c2c" @@ -613,13 +555,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-destructuring@^7.8.3": - version "7.8.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz#fadb2bc8e90ccaf5658de6f8d4d22ff6272a2f4b" - integrity sha512-eRJu4Vs2rmttFCdhPUM3bV0Yo/xPSdPw6ML9KHs/bjB4bLA5HXlbvYXPOD5yASodGod+krjYx21xm1QmL8dCJQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-transform-destructuring@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.9.5.tgz#72c97cf5f38604aea3abf3b935b0e17b1db76a50" @@ -650,7 +585,7 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-flow-strip-types@^7.8.3", "@babel/plugin-transform-flow-strip-types@^7.9.0": +"@babel/plugin-transform-flow-strip-types@^7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.9.0.tgz#8a3538aa40434e000b8f44a3c5c9ac7229bd2392" integrity sha512-7Qfg0lKQhEHs93FChxVLAvhBshOPQDtJUTVHr/ZwQNRccCm4O9D79r9tVSoV8iNwjP1YgfD+e/fgHcPkN1qEQg== @@ -746,14 +681,6 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-replace-supers" "^7.8.3" -"@babel/plugin-transform-parameters@^7.8.7": - version "7.9.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.3.tgz#3028d0cc20ddc733166c6e9c8534559cee09f54a" - integrity sha512-fzrQFQhp7mIhOzmOtPiKffvCYQSK10NR8t6BBz2yPbeUHb9OLW8RZGtgDRBn8z2hGcwvKDL3vC7ojPTLNxmqEg== - dependencies: - "@babel/helper-get-function-arity" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-transform-parameters@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.5.tgz#173b265746f5e15b2afe527eeda65b73623a0795" @@ -792,7 +719,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-jsx" "^7.8.3" -"@babel/plugin-transform-react-jsx-self@^7.8.3", "@babel/plugin-transform-react-jsx-self@^7.9.0": +"@babel/plugin-transform-react-jsx-self@^7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.9.0.tgz#f4f26a325820205239bb915bad8e06fcadabb49b" integrity sha512-K2ObbWPKT7KUTAoyjCsFilOkEgMvFG+y0FqOl6Lezd0/13kMkkjHskVsZvblRPj1PHA44PrToaZANrryppzTvQ== @@ -800,7 +727,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-jsx" "^7.8.3" -"@babel/plugin-transform-react-jsx-source@^7.8.3", "@babel/plugin-transform-react-jsx-source@^7.9.0": +"@babel/plugin-transform-react-jsx-source@^7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.9.0.tgz#89ef93025240dd5d17d3122294a093e5e0183de0" integrity sha512-K6m3LlSnTSfRkM6FcRk8saNEeaeyG5k7AVkBU2bZK3+1zdkSED3qNdsWrUgQBeTVD2Tp3VMmerxVO2yM5iITmw== @@ -808,7 +735,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-jsx" "^7.8.3" -"@babel/plugin-transform-react-jsx@^7.8.3", "@babel/plugin-transform-react-jsx@^7.9.4": +"@babel/plugin-transform-react-jsx@^7.9.4": version "7.9.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.9.4.tgz#86f576c8540bd06d0e95e0b61ea76d55f6cbd03f" integrity sha512-Mjqf3pZBNLt854CK0C/kRuXAnE6H/bo7xYojP+WGtX8glDGSibcwnsWwhwoSuRg0+EBnxPC1ouVnuetUIlPSAw== @@ -904,73 +831,7 @@ core-js "^2.6.5" regenerator-runtime "^0.13.4" -"@babel/preset-env@7.9.0", "@babel/preset-env@^7.4.5": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.0.tgz#a5fc42480e950ae8f5d9f8f2bbc03f52722df3a8" - integrity sha512-712DeRXT6dyKAM/FMbQTV/FvRCms2hPCx+3weRjZ8iQVQWZejWWk1wwG6ViWMyqb/ouBbGOl5b6aCk0+j1NmsQ== - dependencies: - "@babel/compat-data" "^7.9.0" - "@babel/helper-compilation-targets" "^7.8.7" - "@babel/helper-module-imports" "^7.8.3" - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-proposal-async-generator-functions" "^7.8.3" - "@babel/plugin-proposal-dynamic-import" "^7.8.3" - "@babel/plugin-proposal-json-strings" "^7.8.3" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-proposal-numeric-separator" "^7.8.3" - "@babel/plugin-proposal-object-rest-spread" "^7.9.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.8.3" - "@babel/plugin-proposal-optional-chaining" "^7.9.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.8.3" - "@babel/plugin-syntax-async-generators" "^7.8.0" - "@babel/plugin-syntax-dynamic-import" "^7.8.0" - "@babel/plugin-syntax-json-strings" "^7.8.0" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" - "@babel/plugin-syntax-numeric-separator" "^7.8.0" - "@babel/plugin-syntax-object-rest-spread" "^7.8.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" - "@babel/plugin-syntax-optional-chaining" "^7.8.0" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - "@babel/plugin-transform-arrow-functions" "^7.8.3" - "@babel/plugin-transform-async-to-generator" "^7.8.3" - "@babel/plugin-transform-block-scoped-functions" "^7.8.3" - "@babel/plugin-transform-block-scoping" "^7.8.3" - "@babel/plugin-transform-classes" "^7.9.0" - "@babel/plugin-transform-computed-properties" "^7.8.3" - "@babel/plugin-transform-destructuring" "^7.8.3" - "@babel/plugin-transform-dotall-regex" "^7.8.3" - "@babel/plugin-transform-duplicate-keys" "^7.8.3" - "@babel/plugin-transform-exponentiation-operator" "^7.8.3" - "@babel/plugin-transform-for-of" "^7.9.0" - "@babel/plugin-transform-function-name" "^7.8.3" - "@babel/plugin-transform-literals" "^7.8.3" - "@babel/plugin-transform-member-expression-literals" "^7.8.3" - "@babel/plugin-transform-modules-amd" "^7.9.0" - "@babel/plugin-transform-modules-commonjs" "^7.9.0" - "@babel/plugin-transform-modules-systemjs" "^7.9.0" - "@babel/plugin-transform-modules-umd" "^7.9.0" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" - "@babel/plugin-transform-new-target" "^7.8.3" - "@babel/plugin-transform-object-super" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.8.7" - "@babel/plugin-transform-property-literals" "^7.8.3" - "@babel/plugin-transform-regenerator" "^7.8.7" - "@babel/plugin-transform-reserved-words" "^7.8.3" - "@babel/plugin-transform-shorthand-properties" "^7.8.3" - "@babel/plugin-transform-spread" "^7.8.3" - "@babel/plugin-transform-sticky-regex" "^7.8.3" - "@babel/plugin-transform-template-literals" "^7.8.3" - "@babel/plugin-transform-typeof-symbol" "^7.8.4" - "@babel/plugin-transform-unicode-regex" "^7.8.3" - "@babel/preset-modules" "^0.1.3" - "@babel/types" "^7.9.0" - browserslist "^4.9.1" - core-js-compat "^3.6.2" - invariant "^2.2.2" - levenary "^1.1.1" - semver "^5.5.0" - -"@babel/preset-env@7.9.5", "@babel/preset-env@^7.9.5": +"@babel/preset-env@7.9.5", "@babel/preset-env@^7.4.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.5.tgz#8ddc76039bc45b774b19e2fc548f6807d8a8919f" integrity sha512-eWGYeADTlPJH+wq1F0wNfPbVS1w1wtmMJiYk55Td5Yu28AsdR9AsC97sZ0Qq8fHqQuslVSIYSGJMcblr345GfQ== @@ -1036,7 +897,7 @@ levenary "^1.1.1" semver "^5.5.0" -"@babel/preset-flow@7.9.0": +"@babel/preset-flow@7.9.0", "@babel/preset-flow@^7.0.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.9.0.tgz#fee847c3e090b0b2d9227c1949e4da1d1379280d" integrity sha512-88uSmlshIrlmPkNkEcx3UpSZ6b8n0UGBq0/0ZMZCF/uxAW0XIAUuDHBhIOAh0pvweafH4RxOwi/H3rWhtqOYPA== @@ -1044,14 +905,6 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-transform-flow-strip-types" "^7.9.0" -"@babel/preset-flow@^7.0.0": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.8.3.tgz#52af74c6a4e80d889bd9436e8e278d0fecac6e18" - integrity sha512-iCXFk+T4demnq+dNLLvlGOgvYF6sPZ/hS1EmswugOqh1Ysp2vuiqJzpgsnp5rW8+6dLJT/0CXDzye28ZH6BAfQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-transform-flow-strip-types" "^7.8.3" - "@babel/preset-modules@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.3.tgz#13242b53b5ef8c883c3cf7dddd55b36ce80fbc72" @@ -1063,7 +916,7 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-react@7.9.4", "@babel/preset-react@^7.9.4": +"@babel/preset-react@7.9.4", "@babel/preset-react@^7.0.0": version "7.9.4" resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.9.4.tgz#c6c97693ac65b6b9c0b4f25b948a8f665463014d" integrity sha512-AxylVB3FXeOTQXNXyiuAQJSvss62FEotbX2Pzx3K/7c+MKJMdSg6Ose6QYllkdCFA8EInCJVw7M/o5QbLuA4ZQ== @@ -1075,17 +928,6 @@ "@babel/plugin-transform-react-jsx-self" "^7.9.0" "@babel/plugin-transform-react-jsx-source" "^7.9.0" -"@babel/preset-react@^7.0.0": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.8.3.tgz#23dc63f1b5b0751283e04252e78cf1d6589273d2" - integrity sha512-9hx0CwZg92jGb7iHYQVgi0tOEHP/kM60CtWJQnmbATSPIQQ2xYzfoCI3EdqAhFBeeJwYMdWQuDUHMsuDbH9hyQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - "@babel/plugin-transform-react-display-name" "^7.8.3" - "@babel/plugin-transform-react-jsx" "^7.8.3" - "@babel/plugin-transform-react-jsx-self" "^7.8.3" - "@babel/plugin-transform-react-jsx-source" "^7.8.3" - "@babel/preset-typescript@7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.9.0.tgz#87705a72b1f0d59df21c179f7c3d2ef4b16ce192" @@ -1120,16 +962,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.4.0", "@babel/template@^7.7.4", "@babel/template@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8" - integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/parser" "^7.8.3" - "@babel/types" "^7.8.3" - -"@babel/template@^7.8.6": +"@babel/template@^7.4.0", "@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== @@ -1138,46 +971,22 @@ "@babel/parser" "^7.8.6" "@babel/types" "^7.8.6" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.4.tgz#f0845822365f9d5b0e312ed3959d3f827f869e3c" - integrity sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.4" - "@babel/helper-function-name" "^7.8.3" - "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.8.4" - "@babel/types" "^7.8.3" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.13" - -"@babel/traverse@^7.7.0", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": - version "7.9.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.0.tgz#d3882c2830e513f4fe4cec9fe76ea1cc78747892" - integrity sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.5.tgz#6e7c56b44e2ac7011a948c21e283ddd9d9db97a2" + integrity sha512-c4gH3jsvSuGUezlP6rzSJ6jf8fYjLj3hsMZRx/nX0h+fmHN0w+ekubRrHPqnMec0meycA2nwCsJ7dC8IPem2FQ== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.9.0" - "@babel/helper-function-name" "^7.8.3" + "@babel/generator" "^7.9.5" + "@babel/helper-function-name" "^7.9.5" "@babel/helper-split-export-declaration" "^7.8.3" "@babel/parser" "^7.9.0" - "@babel/types" "^7.9.0" + "@babel/types" "^7.9.5" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" - integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== - dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" - -"@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5": +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" integrity sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg== @@ -1563,16 +1372,6 @@ unique-filename "^1.1.1" which "^1.3.1" -"@graphql-toolkit/common@0.10.2": - version "0.10.2" - resolved "https://registry.yarnpkg.com/@graphql-toolkit/common/-/common-0.10.2.tgz#2a3d6bc28b529bee91b13b600c3403857c01dd7c" - integrity sha512-vExjLcKOPG+Wv9P1/mP7P5nm3cWFwE3gAw+Ai4iHigcG+cLBUf8q6VgzyvUnVeL35urAeaRvi23kXXcGz+ITnw== - dependencies: - aggregate-error "3.0.1" - camel-case "4.1.1" - graphql-tools-fork "9.0.1" - lodash "4.17.15" - "@graphql-toolkit/common@0.10.3", "@graphql-toolkit/common@~0.10.2": version "0.10.3" resolved "https://registry.yarnpkg.com/@graphql-toolkit/common/-/common-0.10.3.tgz#6448b7560628099f83a01b26543a320219c9352a" @@ -1634,7 +1433,7 @@ "@graphql-toolkit/common" "0.9.9" tslib "1.11.1" -"@graphql-toolkit/schema-merging@0.10.3": +"@graphql-toolkit/schema-merging@0.10.3", "@graphql-toolkit/schema-merging@~0.10.2": version "0.10.3" resolved "https://registry.yarnpkg.com/@graphql-toolkit/schema-merging/-/schema-merging-0.10.3.tgz#55ae378e6efdcd87441a256ad011e215b79791b4" integrity sha512-2zNFacPCk1J9Q3ygyIzEigQFooqq8NBqny7HLuDZS3U2nhL2eDmOnM8xaUzih73Oxuevw0YzVMXoXz/0Q+S0lg== @@ -1644,16 +1443,6 @@ graphql-tools-fork "9.0.1" tslib "1.11.1" -"@graphql-toolkit/schema-merging@~0.10.2": - version "0.10.2" - resolved "https://registry.yarnpkg.com/@graphql-toolkit/schema-merging/-/schema-merging-0.10.2.tgz#bf7847457b0fe1f97c4ce85b5c2e358e2b00aa18" - integrity sha512-U9ldlnyqq3Lx4lSK+7VyTKgOYqhmQYeDG5NzW4siVkW12az2pYFuspUFibXR4yjRdq8wCqDLjeEEXUSYFi5Nxg== - dependencies: - "@graphql-toolkit/common" "0.10.2" - deepmerge "4.2.2" - graphql-tools-fork "9.0.1" - tslib "1.11.1" - "@graphql-toolkit/url-loader@~0.10.2": version "0.10.3" resolved "https://registry.yarnpkg.com/@graphql-toolkit/url-loader/-/url-loader-0.10.3.tgz#d0db41e97cd6b99e2d96602f73c5a1ce9df473ef" @@ -2012,16 +1801,6 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" -"@jest/types@^25.2.6": - version "25.2.6" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.2.6.tgz#c12f44af9bed444438091e4b59e7ed05f8659cb6" - integrity sha512-myJTTV37bxK7+3NgKc4Y/DlQ5q92/NOwZsZ+Uch7OXdElxOg61QYc72fPYNAjlvbnJ2YvbXLamIsa9tj48BmyQ== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^15.0.0" - chalk "^3.0.0" - "@jest/types@^25.3.0": version "25.3.0" resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.3.0.tgz#88f94b277a1d028fd7117bc1f74451e0fc2131e7" @@ -2861,9 +2640,9 @@ universal-user-agent "^4.0.0" "@octokit/types@^2.0.0", "@octokit/types@^2.0.1": - version "2.5.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.5.1.tgz#22563b3bb50034bea3176eac1860340c5e812e2a" - integrity sha512-q4Wr7RexkPRrkQpXzUYF5Fj/14Mr65RyOHj6B9d/sQACpqGcStkHZj4qMEtlMY5SnD/69jlL9ItGPbDM0dR/dA== + version "2.8.1" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.8.1.tgz#935ba46c3abb745e913b1110b87f1ca75f2a3792" + integrity sha512-1fzZcYTvPkrJsS9MX7oTMun447Q/tJo5XOtXQsKqmbTbwQV1f+R58pDmjDbzeFbQ7KzMJaDN7Sq4bCh/WHmgLg== dependencies: "@types/node" ">= 8" @@ -2890,9 +2669,9 @@ integrity sha512-DetpxZw1fzPD5xUBrIAoplLChO2VB8DlL5Gg+I1IR9b2wPqYIca2WSUxL5g1vLeR4MsQq1NeWriXAVffV+U1Fw== "@sinonjs/commons@^1.7.0": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.7.1.tgz#da5fd19a5f71177a53778073978873964f49acf1" - integrity sha512-Debi3Baff1Qu1Unc3mjJ96MgpbwTn43S1+9yJ0llWygPwDNu2aaWBD6yc9y/Z8XDRNhx7U+u2UDg2OGQXkclUQ== + version "1.7.2" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.7.2.tgz#505f55c74e0272b43f6c52d81946bed7058fc0e2" + integrity sha512-+DUO6pnp3udV/v2VfUWgaY5BIE1IfT7lLfeDzPVeMT1XKkaAp9LgSI9x5RtrFQoZ9Oi0PgXQQHPaoKu7dCjVxw== dependencies: type-detect "4.0.8" @@ -3590,9 +3369,9 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.0.9" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.9.tgz#be82fab304b141c3eee81a4ce3b034d0eba1590a" - integrity sha512-jEFQ8L1tuvPjOI8lnpaf73oCJe+aoxL6ygqSy6c8LcW98zaC+4mzWuQIRCEvKeCOu+lbqdXcg4Uqmm1S8AP1tw== + version "7.0.10" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.10.tgz#d9a99f017317d9b3d1abc2ced45d3bca68df0daf" + integrity sha512-74fNdUGrWsgIB/V9kTO5FGHPWYY6Eqn+3Z7L6Hc4e/BxjYV7puvBqp5HwsVYYfLm6iURYBNCx4Ut37OF9yitCw== dependencies: "@babel/types" "^7.3.0" @@ -3775,12 +3554,7 @@ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.7.tgz#315d570ccb56c53452ff8638738df60726d5b6ea" integrity sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ== -"@types/node@*", "@types/node@>= 8", "@types/node@^13.7.1": - version "13.11.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.11.0.tgz#390ea202539c61c8fa6ba4428b57e05bc36dc47b" - integrity sha512-uM4mnmsIIPK/yeO+42F2RQhGUIs39K2RFmugcJANppXe6J1nvH87PvzPZYpza7Xhhs8Yn9yIAVdLZ84z61+0xQ== - -"@types/node@^13.11.1": +"@types/node@*", "@types/node@>= 8", "@types/node@^13.11.1", "@types/node@^13.7.1": version "13.11.1" resolved "https://registry.yarnpkg.com/@types/node/-/node-13.11.1.tgz#49a2a83df9d26daacead30d0ccc8762b128d53c7" integrity sha512-eWQGP3qtxwL8FGneRrC5DwrJLGN4/dH1clNTuLfN81HCrxVtxRjygDTUoZJ5ASlDEeo0ppYFQjQIlXhtXpOn6g== @@ -3849,15 +3623,7 @@ dependencies: "@types/react" "*" -"@types/react@*": - version "16.9.32" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.32.tgz#f6368625b224604148d1ddf5920e4fefbd98d383" - integrity sha512-fmejdp0CTH00mOJmxUPPbWCEBWPvRIL4m8r0qD+BSDUqmutPyGQCHifzMpMzdvZwROdEdL78IuZItntFWgPXHQ== - dependencies: - "@types/prop-types" "*" - csstype "^2.2.0" - -"@types/react@^16.9.11": +"@types/react@*", "@types/react@^16.9.11": version "16.9.34" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.34.tgz#f7d5e331c468f53affed17a8a4d488cd44ea9349" integrity sha512-8AJlYMOfPe1KGLKyHpflCg5z46n0b5DbRfqDksxBLBTUpB75ypDBAO9eCUcjNwE6LCUslwTz00yyG/X9gaVtow== @@ -4046,7 +3812,7 @@ regexpp "^3.0.0" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@2.27.0": +"@typescript-eslint/experimental-utils@2.27.0", "@typescript-eslint/experimental-utils@^2.5.0": version "2.27.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.27.0.tgz#801a952c10b58e486c9a0b36cf21e2aab1e9e01a" integrity sha512-vOsYzjwJlY6E0NJRXPTeCGqjv5OHgRU1kzxHKWJVPjDYGbPgLudBXjIlc+OD1hDBZ4l1DLbOc5VjofKahsu9Jw== @@ -4056,16 +3822,6 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/experimental-utils@^2.5.0": - version "2.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.26.0.tgz#063390c404d9980767d76274df386c0aa675d91d" - integrity sha512-RELVoH5EYd+JlGprEyojUv9HeKcZqF7nZUGSblyAw1FwOGNnmQIU8kxJ69fttQvEwCsX5D6ECJT8GTozxrDKVQ== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.26.0" - eslint-scope "^5.0.0" - eslint-utils "^2.0.0" - "@typescript-eslint/parser@^2.27.0": version "2.27.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.27.0.tgz#d91664335b2c46584294e42eb4ff35838c427287" @@ -4076,19 +3832,6 @@ "@typescript-eslint/typescript-estree" "2.27.0" eslint-visitor-keys "^1.1.0" -"@typescript-eslint/typescript-estree@2.26.0": - version "2.26.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.26.0.tgz#d8132cf1ee8a72234f996519a47d8a9118b57d56" - integrity sha512-3x4SyZCLB4zsKsjuhxDLeVJN6W29VwBnYpCsZ7vIdPel9ZqLfIZJgJXO47MNUkurGpQuIBALdPQKtsSnWpE1Yg== - dependencies: - debug "^4.1.1" - eslint-visitor-keys "^1.1.0" - glob "^7.1.6" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^6.3.0" - tsutils "^3.17.1" - "@typescript-eslint/typescript-estree@2.27.0": version "2.27.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.27.0.tgz#a288e54605412da8b81f1660b56c8b2e42966ce8" @@ -5050,12 +4793,12 @@ atob@^2.1.2: integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== autoprefixer@^9.6.1, autoprefixer@^9.7.2: - version "9.7.5" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.5.tgz#8df10b9ff9b5814a8d411a5cfbab9c793c392376" - integrity sha512-URo6Zvt7VYifomeAfJlMFnYDhow1rk2bufwkbamPEAtQFcL11moLk4PnR7n9vlu7M+BkXAZkHFA0mIcY7tjQFg== + version "9.7.6" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.7.6.tgz#63ac5bbc0ce7934e6997207d5bb00d68fa8293a4" + integrity sha512-F7cYpbN7uVVhACZTeeIeealwdGM6wMtfWARVLTy5xmKtgVdBNJvbDRoCK3YO1orcs7gv/KwYlb3iXwu9Ug9BkQ== dependencies: - browserslist "^4.11.0" - caniuse-lite "^1.0.30001036" + browserslist "^4.11.1" + caniuse-lite "^1.0.30001039" chalk "^2.4.2" normalize-range "^0.1.2" num2fraction "^1.2.2" @@ -5751,7 +5494,7 @@ browserslist@4.7.0: electron-to-chromium "^1.3.247" node-releases "^1.1.29" -browserslist@^4.0.0, browserslist@^4.11.0, browserslist@^4.6.4, browserslist@^4.8.5: +browserslist@^4.0.0, browserslist@^4.11.1, browserslist@^4.6.4, browserslist@^4.8.5: version "4.11.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.11.1.tgz#92f855ee88d6e050e7e7311d987992014f1a1f1b" integrity sha512-DCTr3kDrKEYNw6Jb9HFxVLQNaue8z+0ZfRBRjmCunKDEXEBajKDj2Y+Uelg+Pi29OnvaSGwjOsnRyNEkXzHg5g== @@ -6008,21 +5751,16 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001036: - version "1.0.30001039" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001039.tgz#b3814a1c38ffeb23567f8323500c09526a577bbe" - integrity sha512-SezbWCTT34eyFoWHgx8UWso7YtvtM7oosmFoXbCkdC6qJzRfBTeTgE9REtKtiuKXuMwWTZEvdnFNGAyVMorv8Q== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001038, caniuse-lite@^1.0.30001039: + version "1.0.30001040" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001040.tgz#103fc8e6eb1d7397e95134cd0e996743353d58ea" + integrity sha512-Ep0tEPeI5wCvmJNrXjE3etgfI+lkl1fTDU6Y3ZH1mhrjkPlVI9W4pcKbMo+BQLpEWKVYYp2EmYaRsqpPC3k7lQ== caniuse-lite@^1.0.30001035: version "1.0.30001037" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001037.tgz#cf666560b14f8dfa18abc235db1ef2699273af6e" integrity sha512-qQP40FzWQ1i9RTjxppOUnpM8OwTBFL5DQbjoR9Az32EtM7YUZOw9orFO6rj1C+xWAGzz+X3bUe09Jf5Ep+zpuA== -caniuse-lite@^1.0.30001038: - version "1.0.30001040" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001040.tgz#103fc8e6eb1d7397e95134cd0e996743353d58ea" - integrity sha512-Ep0tEPeI5wCvmJNrXjE3etgfI+lkl1fTDU6Y3ZH1mhrjkPlVI9W4pcKbMo+BQLpEWKVYYp2EmYaRsqpPC3k7lQ== - capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -6970,7 +6708,7 @@ css-has-pseudo@^0.10.0: postcss "^7.0.6" postcss-selector-parser "^5.0.0-rc.4" -css-loader@3.4.2, css-loader@^3.4.2: +css-loader@3.4.2: version "3.4.2" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.4.2.tgz#d3fdb3358b43f233b78501c5ed7b1c6da6133202" integrity sha512-jYq4zdZT0oS0Iykt+fqnzVLRIeiPWhka+7BqPn+oSIpWJAHak5tmB/WZrJ2a21JhCeFyNnnlroSl8c+MtVndzA== @@ -7817,21 +7555,16 @@ ejs@^2.6.1, ejs@^2.7.4: resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== -electron-to-chromium@^1.3.247: - version "1.3.397" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.397.tgz#db640c2e67b08d590a504c20b56904537aa2bafa" - integrity sha512-zcUd1p/7yzTSdWkCTrqGvbnEOASy96d0RJL/lc5BDJoO23Z3G/VHd0yIPbguDU9n8QNUTCigLO7oEdtOb7fp2A== +electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.390: + version "1.3.403" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.403.tgz#c8bab4e2e72bf78bc28bad1cc355c061f9cc1918" + integrity sha512-JaoxV4RzdBAZOnsF4dAlZ2ijJW72MbqO5lNfOBHUWiBQl3Rwe+mk2RCUMrRI3rSClLJ8HSNQNqcry12H+0ZjFw== electron-to-chromium@^1.3.380: version "1.3.384" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.384.tgz#ca1d5710a4c53168431f1cbef39c8a971b646bf8" integrity sha512-9jGNF78o450ymPf63n7/j1HrRAD4xGTsDkKY2X6jtCAWaYgph2A9xQjwfwRpj+AovkARMO+JfZuVCFTdandD6w== -electron-to-chromium@^1.3.390: - version "1.3.401" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.401.tgz#4b84f80c68af9d23cebb8f2cc97b1479197ebffa" - integrity sha512-9tvSOS1++0EQP0tkgyD8KJergVZsld1/UqOusZVTbx9MWZHw5NCezkOjIQ5YWeB45jKdQerDfRrt28HwidI9Ow== - elegant-spinner@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" @@ -8624,15 +8357,16 @@ fast-glob@^2.0.2, fast-glob@^2.2.6: micromatch "^3.1.10" fast-glob@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.1.tgz#87ee30e9e9f3eb40d6f254a7997655da753d7c82" - integrity sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g== + version "3.2.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.2.tgz#ade1a9d91148965d4bf7c51f72e1ca662d32e63d" + integrity sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A== dependencies: "@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" + picomatch "^2.2.1" fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.1.0" @@ -9938,34 +9672,7 @@ html-minifier-terser@^5.0.1: relateurl "^0.2.7" terser "^4.6.3" -html-webpack-plugin@^4.0.0-beta.2, html-webpack-plugin@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.0.4.tgz#90cdfb168094e93e047174d9baca098ec5540636" - integrity sha512-BREQzUbFfIQS39KqxkT2L1Ot0tuu1isako1CaCQLrgEQ43zi2ScHAe3SMTnVBWsStnIsGtl8jprDdxwZkNhrwQ== - dependencies: - "@types/html-minifier-terser" "^5.0.0" - "@types/tapable" "^1.0.5" - "@types/webpack" "^4.41.8" - html-minifier-terser "^5.0.1" - loader-utils "^1.2.3" - lodash "^4.17.15" - pretty-error "^2.1.1" - tapable "^1.1.3" - util.promisify "1.0.0" - -html-webpack-plugin@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.0.1.tgz#f5e5ec9cd40967e691df3ffce91bb65c6c0123ad" - integrity sha512-L6JkRGdvcZcA/zYbELcGvdQKAPtH8mfRE7R5u9/9kXZlZyhteQoae43XPfRS9QEIrMGU/myoRT3X4Ysw1ISyfw== - dependencies: - html-minifier-terser "^5.0.1" - loader-utils "^1.2.3" - lodash "^4.17.15" - pretty-error "^2.1.1" - tapable "^1.1.3" - util.promisify "1.0.0" - -html-webpack-plugin@^4.2.0: +html-webpack-plugin@^4.0.0-beta.2, html-webpack-plugin@^4.0.4, html-webpack-plugin@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.2.0.tgz#ea46f15b620d4c1c8c73ea399395c81208e9f823" integrity sha512-zL7LYTuq/fcJX6vV6tmmvFR508Bd9e6kvVGbS76YAjZ2CPVRzsjkvDYs/SshPevpolSdTWgaDV39D6k6oQoVFw== @@ -11196,17 +10903,7 @@ jest-diff@^24.3.0, jest-diff@^24.9.0: jest-get-type "^24.9.0" pretty-format "^24.9.0" -jest-diff@^25.1.0, jest-diff@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.2.6.tgz#a6d70a9ab74507715ea1092ac513d1ab81c1b5e7" - integrity sha512-KuadXImtRghTFga+/adnNrv9s61HudRMR7gVSbP35UKZdn4IK2/0N0PpGZIqtmllK9aUyye54I3nu28OYSnqOg== - dependencies: - chalk "^3.0.0" - diff-sequences "^25.2.6" - jest-get-type "^25.2.6" - pretty-format "^25.2.6" - -jest-diff@^25.2.1, jest-diff@^25.3.0: +jest-diff@^25.1.0, jest-diff@^25.2.1, jest-diff@^25.3.0: version "25.3.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.3.0.tgz#0d7d6f5d6171e5dacde9e05be47b3615e147c26f" integrity sha512-vyvs6RPoVdiwARwY4kqFWd4PirPLm2dmmkNzKqo38uZOzJvLee87yzDjIZLmY1SjM3XR5DwsUH+cdQ12vgqi1w== @@ -11423,17 +11120,7 @@ jest-matcher-utils@^24.9.0: jest-get-type "^24.9.0" pretty-format "^24.9.0" -jest-matcher-utils@^25.1.0: - version "25.2.7" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.2.7.tgz#53fad3c11fc42e92e374306df543026712c957a3" - integrity sha512-jNYmKQPRyPO3ny0KY1I4f0XW4XnpJ3Nx5ovT4ik0TYDOYzuXJW40axqOyS61l/voWbVT9y9nZ1THL1DlpaBVpA== - dependencies: - chalk "^3.0.0" - jest-diff "^25.2.6" - jest-get-type "^25.2.6" - pretty-format "^25.2.6" - -jest-matcher-utils@^25.3.0: +jest-matcher-utils@^25.1.0, jest-matcher-utils@^25.3.0: version "25.3.0" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.3.0.tgz#76765788a26edaa8bc5f0100aea52ae383559648" integrity sha512-ZBUJ2fchNIZt+fyzkuCFBb8SKaU//Rln45augfUtbHaGyVxCO++ANARdBK9oPGXU3hEDgyy7UHnOP/qNOJXFUg== @@ -12976,16 +12663,11 @@ minimist-options@^3.0.1: arrify "^1.0.1" is-plain-obj "^1.1.0" -minimist@1.2.5, minimist@^1.2.5: +minimist@1.2.5, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - minipass-collect@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" @@ -14255,10 +13937,10 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.5: - version "2.2.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" - integrity sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA== +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== pify@^2.0.0, pify@^2.2.0, pify@^2.3.0: version "2.3.0" @@ -15026,16 +14708,16 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= -prettier@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.4.tgz#2d1bae173e355996ee355ec9830a7a1ee05457ef" - integrity sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w== - prettier@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.2.tgz#1ba8f3eb92231e769b7fcd7cb73ae1b6b74ade08" integrity sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg== +prettier@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.4.tgz#2d1bae173e355996ee355ec9830a7a1ee05457ef" + integrity sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w== + pretty-bytes@5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.3.0.tgz#f2849e27db79fb4d6cfe24764fc4134f165989f2" @@ -15059,17 +14741,7 @@ pretty-format@^24.3.0, pretty-format@^24.9.0: ansi-styles "^3.2.0" react-is "^16.8.4" -pretty-format@^25.1.0, pretty-format@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.2.6.tgz#542a1c418d019bbf1cca2e3620443bc1323cb8d7" - integrity sha512-DEiWxLBaCHneffrIT4B+TpMvkV9RNvvJrd3lY9ew1CEQobDzEXmYT1mg0hJhljZty7kCc10z13ohOFAE8jrUDg== - dependencies: - "@jest/types" "^25.2.6" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" - react-is "^16.12.0" - -pretty-format@^25.2.1, pretty-format@^25.3.0: +pretty-format@^25.1.0, pretty-format@^25.2.1, pretty-format@^25.3.0: version "25.3.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.3.0.tgz#d0a4f988ff4a6cd350342fdabbb809aeb4d49ad5" integrity sha512-wToHwF8bkQknIcFkBqNfKu4+UZqnrLn/Vr+wwKQwwvPzkBfDDKp/qIabFqdgtoi5PEnM8LFByVsOrHoa3SpTVA== @@ -16363,9 +16035,9 @@ saxes@^4.0.2: xmlchars "^2.2.0" saxes@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.0.tgz#b7d30284d7583a5ca6ad0248b56d8889da53788b" - integrity sha512-LXTZygxhf8lfwKaTP/8N9CsVdjTlea3teze4lL6u37ivbgGbV0GGMuNtS/I9rnD/HC2/txUM7Df4S2LVl1qhiA== + version "5.0.1" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" + integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== dependencies: xmlchars "^2.2.0" @@ -17165,9 +16837,9 @@ string.prototype.padstart@^3.0.0: es-abstract "^1.17.0-next.1" string.prototype.trimend@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz#ee497fd29768646d84be2c9b819e292439614373" - integrity sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA== + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz#85812a6b847ac002270f5808146064c995fb6913" + integrity sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== dependencies: define-properties "^1.1.3" es-abstract "^1.17.5" @@ -17191,9 +16863,9 @@ string.prototype.trimright@^2.1.1: string.prototype.trimend "^1.0.0" string.prototype.trimstart@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz#afe596a7ce9de905496919406c9734845f01a2f2" - integrity sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w== + version "1.0.1" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz#14af6d9f34b053f7cfc89b72f8f2ee14b9039a54" + integrity sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== dependencies: define-properties "^1.1.3" es-abstract "^1.17.5" @@ -17332,7 +17004,7 @@ stubs@^3.0.0: resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b" integrity sha1-6NK6H6nJBXAwPAMLaQD31fiavls= -style-loader@^1.0.0, style-loader@^1.0.1, style-loader@^1.1.3: +style-loader@^1.0.0, style-loader@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.1.3.tgz#9e826e69c683c4d9bf9db924f85e9abb30d5e200" integrity sha512-rlkH7X/22yuwFYK357fMN/BxYOorfnfq0eD7+vqlemSK4wEcejFF1dg4zxP0euBW8NrYx2WZzZ8PPFevr7D+Kw== @@ -17577,9 +17249,9 @@ terser-webpack-plugin@^2.1.2: webpack-sources "^1.4.3" terser@^4.1.2, terser@^4.4.3, terser@^4.6.3: - version "4.6.10" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.10.tgz#90f5bd069ff456ddbc9503b18e52f9c493d3b7c2" - integrity sha512-qbF/3UOo11Hggsbsqm2hPa6+L4w7bkr+09FNseEe8xrcVD3APGLFqE+Oz1ZKAxjYnFsj80rLOfgAtJ0LNJjtTA== + version "4.6.11" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f" + integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA== dependencies: commander "^2.20.0" source-map "~0.6.1" @@ -18266,9 +17938,9 @@ utils-merge@1.0.1: integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= uuid@^3.0.1, uuid@^3.3.2, uuid@^3.3.3: - version "3.3.3" - resolved "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" - integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== uuid@^7.0.1, uuid@^7.0.2: version "7.0.3" @@ -18505,7 +18177,7 @@ webpack-bundle-analyzer@^3.6.1: opener "^1.5.1" ws "^6.0.0" -webpack-cli@^3.3.10, webpack-cli@^3.3.11: +webpack-cli@^3.3.11: version "3.3.11" resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.11.tgz#3bf21889bf597b5d82c38f215135a411edfdc631" integrity sha512-dXlfuml7xvAFwYUPsrtQAA9e4DOe58gnzSxhgrO/ZM/gyXTBowrsYeubyN4mqGhYdpXMFNyQ6emjJS9M7OBd4g==