apollographql / apollographql/apollo-tooling

Using localSchemaFile connection refused

Open
#2,047 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

Issue Type: Bug

I am trying to get the extension to work with a minimal configuration.
```
// apollo.config.js
module.exports = {
service: {
localSchemaFile: './src/schema.graphql'
}
};
```

```
// src/schema.grphql
type Query {
hello: String
}

```
Server is running and I can reach it in the browser but VSCode insists that connection got refused. I even tried CORS with no effect.

`request to http://localhost:4000/graphql failed, reason: connect ECONNREFUSED 127.0.0.1:4000`

Extension version: 1.16.6
VS Code version: Code - Insiders 1.48.0-insider (eb1ca267d6a478734bd7f3d629ac9b80926ee9d1, 2020-07-21T12:39:31.001Z)
OS version: Darwin x64 18.7.0

System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz (8 x 2800)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled|
|Load (avg)|62, 91, 88|
|Memory (System)|16.00GB (0.40GB free)|
|Process Argv|-psn_0_413797|
|Screen Reader|no|
|VM|0%|

Contributor guide

Open the contributing guide

Research direction

Reproduce the minimal configuration from apollo.config.js using src/schema.graphql and the reported localhost:4000/graphql request. Start by tracing how the VS Code extension handles localSchemaFile and compare the configured schema path with the supplied filename. Done means the minimal local-schema setup no longer attempts the refused connection, with the behavior verified against this example.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.