apollographql / apollographql/federation

No playground when listening on port 6000

Open
#394 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
725
Forks
276
Avg merge
1h 47m
Merged PRs (30d)
1

Description

### Description

I'm new to Apollo and Graphql so I tried the [federation-services demo](https://github.com/apollographql/federation-demo) This demo works fine out of the box but when you update the file [gateway.js](https://github.com/apollographql/federation-demo/blob/master/gateway.js) to use **port 6000** it fails to open the graphql Playground. No error is thrown, it just shows a blank page in Google Chrome:

### Reproduction steps

Update the file [gateway.js](https://github.com/apollographql/federation-demo/blob/master/gateway.js) to use port 6000

From:
```js
server.listen().then(({ url }) => {
console.log(`🚀 Server ready at ${url}`);
});
```
To:
```js
server.listen({ port: 6000 }).then(({ uri }) => {
console.log(`🚀 Server ready at ${url}`);
});
```

### Extra information

The port is not in use on my system this has been verified:
```powershell
Get-Process -Id (Get-NetTCPConnection -LocalPort 6000).OwningProcess
```

I've done a complete reboot and the problem is still there. All other ports work fine except for this one. I've been going nuts about this as I've been trying to find the issue for a whole day. I really thought I didn't configure Apollo Gateway correctly or something.

Thank you for looking into this.

### Version
```json
"dependencies": {
"@apollo/federation": "^0.16.2",
"@apollo/gateway": "^0.16.2",
"apollo-server": "^2.14.1",
"concurrently": "^5.2.0",
"graphql": "^15.0.0"
}
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by changing server.listen in gateway.js to use port 6000, then inspect how the Apollo Gateway server exposes the GraphQL Playground and reports its listening URL. Compare the callback values in the two examples and verify completion by loading the Playground successfully on port 6000 without startup errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Bug
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.