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

Not possible to catch the error when fetching schema #621

Open
rchl opened this issue Nov 23, 2020 · 0 comments
Open

Not possible to catch the error when fetching schema #621

rchl opened this issue Nov 23, 2020 · 0 comments

Comments

@rchl
Copy link

rchl commented Nov 23, 2020

The graphql-language-service-cli package (from a project hosted at https://github.com/graphql/graphiql) uses this package to load graphql settings and I've recently reported an issue in it that when the graphql server is not running, there is an unhandled promise rejection reported in the console. That issue is here: graphql/graphiql#1711.

It turns out that the consumer of this graphql-config package can't do anything to prevent that unhandled rejection (and unhandled rejections are bad as they crash the process from Node 14 (I believe)).

The consumer should be able to catch the error that triggers on connecting to the graphql server or the graphql-config package should catch it and somehow propagate the error to the caller.

This error happens when calling loadConfig when the graphql server is not running so connecting to it will fail.

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

No branches or pull requests

1 participant