apollographql / apollographql/apollo-tooling

Improve error messaging around endpoint 404s

Open
#1,699 0 comments 0 reactions 0 assignees View on GitHub
:x: errors
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.