Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: repair CLI, handle all schema and LSP errors #1482

Merged
merged 2 commits into from
Apr 11, 2020

Conversation

acao
Copy link
Member

@acao acao commented Apr 11, 2020

This should do what @divyenduz set out to do in #1481 more universally. Any exception in any of the handlers bubbles up to the GLS output channel now.

It also repairs the CLI. It was targeting esnext by default, thus a use of nullish coalescing was breaking the CLI (not supported natively in node yet).

So, I set it to target: es2017 for node 10 support.

Additionally, CLI should default method to node as advertised.

Tested with both the CLI using validate command, and vscode-graphql - the only issue there is the custom prisma extension is throwing an error. the extension works great if you remove that extension. I think it just needs to be upgraded for the new graphql-config?

@acao
Copy link
Member Author

acao commented Apr 11, 2020

@divyenduz should probably add a few tests as well?

@acao
Copy link
Member Author

acao commented Apr 11, 2020

@huv1k I saw you were interested in the first PR, do you want to give this one a test run?

This should solve the problem for all handlers and other errors (hover, completion, diagnostics, etc). I added this to a PR a while back where we were trying to add more error handling, because apparently there wasn't much before, but there weren't enough people to review the PR at the time so I removed it to make it simpler.

To help me out, could someone open a PR to add tests to this? If not I can work on it some more tomorrow. Have a lot of GraphiQL and Monaco things going on, making lots of changes to the LSP!

@acao
Copy link
Member Author

acao commented Apr 11, 2020

have a few more improvements! dang the LSP server has some issues :(

@acao
Copy link
Member Author

acao commented Apr 11, 2020

@divyenduz this takes care of a few things now!

@acao acao changed the title fix: handle all schema and LSP errors fix: repair CLI, handle all schema and LSP errors Apr 11, 2020
@acao acao mentioned this pull request Apr 11, 2020
@acao acao merged commit 992f384 into graphql:master Apr 11, 2020
@acao acao deleted the fix/handle-all-errors branch April 11, 2020 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant