Autocomplete in `gql` tagged literals does not work when an Angular `@Component` is present
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 1.9k
- Avg merge
- 22h 45m
- Merged PRs (30d)
- 70
Description
## Actual Behavior
Autocomplete fails in `gql` tagged literals, very similar to the behaviour described here:
https://github.com/graphql/vscode-graphql/issues/145

## Expected Behavior
Autocomplete works in tagged literals.
## Steps to Reproduce the Problem Or Description
This issue only seems to happen in an angular component, with the
```
@Component({
selector: 'test',
templateUrl: './test.html',
styleUrls: ['./test.scss'],
})
```
section present in the file. The moment I comment out `@Component` from the file, autocomplete starts working again.
However, when I put the @Component back into the file, autocomplete will start breaking again by giving the wrong results.

## Specifications
This has occured on multiple different computers
- GraphQL for VSCode Extension Version: 0.3.15
- VSCode Version: 1.55
- OS Name: Windows 10
- OS Version: 20H2
## Logs Of TS Server || GraphQL Language Service
There are two different error messages, one for a fresh vscode start, opening a file containing `@Component`:
```
[Trace - 10:30:27 AM] Sending request 'textDocument/completion - (6)'.
Params: {
"textDocument": {
"uri": "file:///c%3A/Users/username/Documents/test/src/app/test/start/start.component.ts"
},
"position": {
"line": 33,
"character": 34
},
"context": {
"triggerKind": 1
}
}
[Trace - 10:30:27 AM] Received response 'textDocument/completion - (6)' in 5ms. Request failed: Request textDocument/completion failed with message: A cached document cannot be found. (-32603).
[Error - 10:30:27 AM] Request textDocument/completion failed.
Message: Request textDocument/completion failed with message: A cached document cannot be found.
Code: -32603
```
And a different message after I commented and uncommented the `@Component`
```
(node:12540) UnhandledPromiseRejectionWarning: SyntaxError: Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead. (21:0)
at Object._raise (c:\Users\username\.vscode\extensions\graphql.vscode-graphql-0.3.15\node_modules\@babel\parser\lib\index.js:748:17)
at Object.raiseWithData (c:\Users\username\.vscode\extensions\graphql.vscode-graphql-0.3.15\node_modules\@babel\parser\lib\index.js:741:17)
at Object.raise (c:\Users\username\.vscode\extensions\graphql.vscode-graphql-0.3.15\node_modules\@babel\parser\lib\index.js:735:17)
at Object.parseDecorators (c:\Users\username\.vscode\extensions\graphql.vscode-graphql-0.3.15\node_modules\@babel\parser\lib\index.js:11826:14)
at Object.parseStatement (c:\Users\username\.vscode\extensions\graphql.vscode-graphql-0.3.15\node_modules\@babel\parser\lib\index.js:11647:12)
at Object.parseBlockOrModuleBlockBody (c:\Users\username\.vscode\extensions\graphql.vscode-graphql-0.3.15\node_modules\@babel\parser\lib\index.js:12232:25)
at Object.parseBlockBody (c:\Users\username\.vscode\extensions\graphql.vscode-graphql-0.3.15\node_modules\@babel\parser\lib\index.js:12218:10)
at Object.parseTopLevel (c:\Users\username\.vscode\extensions\graphql.vscode-graphql-0.3.15\node_modules\@babel\parser\lib\index.js:11581:10)
at Object.parse (c:\Users\username\.vscode\extensions\graphql.vscode-graphql-0.3.15\node_modules\@babel\parser\lib\index.js:13392:10)
at Object.parse (c:\Users\username\.vscode\extensions\graphql.vscode-graphql-0.3.15\node_modules\@babel\parser\lib\index.js:13445:38)
(node:12540) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 14)
```
Contributor guide
Assessment
This issue has not been assessed yet.