apollographql / apollographql/apollo-tooling
Improve error messaging around endpoint 404s
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
By default, if there is no `--endpoint` or service url provided, the language server will try to introspect against `http://localhost:4000`. If this introspection fails, the user sees a "request to http://localhost:4000 failed" error, but without any explanation as to _why_ it was looking at localhost to begin with.
We should recognize when a url isn't passed in, and provide a helpful error when introspection against the default url fails.
Contributor guide
Research direction
Start by tracing the language server's introspection path when no --endpoint or service URL is provided, including where the default http://localhost:4000 URL is selected and its failure is reported. Done means a failed request to that default URL explains why localhost was used, while an explicitly supplied URL retains appropriate error messaging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100