apollographql / apollographql/apollo-tooling
apollo-vscode not respecting client.service.url
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 460
- PR merge metrics
- No merged PRs in 30d
Description
**Intended outcome:**
Schema should be loaded from locally running server instance
**Actual outcome:**
Schema is *always* fetched from Apollo Graph Manager (formerly Apollo Engine). I know this b/c
1. The auto-completion does not show updates to values made on the server
2. Stopping the local server instance throws no errors and auto-completion works according to published version
3. When I switch networking off, I get the error:
`FetchError: request to https://engine-graphql.apollographql.com/api/graphql failed`
⚠️ The only way to force apollo-vscode to respect the `url` property is to remove the token from the `.env` file.
**How to reproduce the issue:**
1. Install the apollo-vscode extension
2. Have a locally running instance of your GraphQL server
3. Point to it in you `apollo.config.js`
My values:
```js
module.exports = {
client: {
service: {
name: "my-service",
url: "http://localhost:4000/graphql",
},
},
};
```
Although not necessary when pulling schema from a locally running instance (I think), I also have the AGM key in my `.env` file.
**Versions**
VS Code: `1.37.1`
`apollographql.vscode-apollo`: `1.10.0`
`"apollo": "^2.18.0"`
Contributor guide
Research direction
Reproduce the issue with the shown apollo.config.js, a local server at http://localhost:4000/graphql, and an AGM key in .env. Start by tracing how the VS Code extension chooses between client.service.url and Apollo Graph Manager, then verify that local schema changes are used and offline operation no longer contacts Graph Manager.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100