(uri: string, position: monaco.Position)
| 75 | } |
| 76 | |
| 77 | public async doHover(uri: string, position: monaco.Position) { |
| 78 | try { |
| 79 | const documentModel = this._getTextModel(uri); |
| 80 | const document = documentModel?.getValue(); |
| 81 | if (!document) { |
| 82 | return null; |
| 83 | } |
| 84 | const graphQLPosition = toGraphQLPosition(position); |
| 85 | |
| 86 | const hover = this._languageService.getHover( |
| 87 | uri, |
| 88 | document, |
| 89 | graphQLPosition, |
| 90 | ); |
| 91 | |
| 92 | return { |
| 93 | content: hover, |
| 94 | range: toMonacoRange( |
| 95 | getRange( |
| 96 | { |
| 97 | column: graphQLPosition.character, |
| 98 | line: graphQLPosition.line, |
| 99 | }, |
| 100 | document, |
| 101 | ), |
| 102 | ), |
| 103 | }; |
| 104 | } catch (err) { |
| 105 | // eslint-disable-next-line no-console |
| 106 | console.error(err); |
| 107 | return null; |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | public async doGetVariablesJSONSchema(uri: string): Promise<unknown> { |
| 112 | const documentModel = this._getTextModel(uri); |
no test coverage detected