apollographql / apollographql/apollo-tooling

Avoid crashing the VSCode extension

Open
#1,874 2 comments 5 reactions 0 assignees View on GitHub
:spiral_notepad: component - vscode
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

Hi. If there are issues with the GraphQL schema like say, 2 GQL queries using the same name, or invalid GQL file and so on, the extension reports the error, retries 3-4 times and crashes.

For eg. this is a valid error:

![Screenshot from 2020-04-06 15-20-22](https://user-images.githubusercontent.com/1165845/78555344-754a8900-782a-11ea-999d-311bf7e2979f.png)

But when issues like this occur, this happens:

![Screenshot](https://user-images.githubusercontent.com/1165845/68545541-11936f80-03f4-11ea-822c-5bf8b75d3e3d.png)

Related https://github.com/apollographql/apollo-tooling/issues/801#issuecomment-552200208

You can get it working again only after you restart VSCode. It would be great, if it shows the error but the extension does not crash so that I can fix the error but at the same time have it working for the remaining files.

Or, if that's not possible, atleast a way to restart the extension without closing the VSCode window since it is inconvenient to do that everytime. Hope this makes sense.

Thanks.

Contributor guide

Open the contributing guide

Research direction

No source file, test, or entry point is named. Start by reproducing the crash in the VSCode extension with duplicate query names or an invalid GraphQL file, then trace the reported error and retries; done means schema errors are shown while the extension remains usable for the remaining files.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.