Apollo-tooling: apollo-vscode not respecting client.service.url

Created on 30 Aug 2019  ·  1Comment  ·  Source: apollographql/apollo-tooling

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:

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"

Most helpful comment

This seems to still be broken for:
VS Code: 1.43.2
apollographql.vscode-apollo: 1.15.0
apollo: 2.26.0

Would love to see this fixed as it would improve the workflow when adding new schema features so much more smooth :)

>All comments

This seems to still be broken for:
VS Code: 1.43.2
apollographql.vscode-apollo: 1.15.0
apollo: 2.26.0

Would love to see this fixed as it would improve the workflow when adding new schema features so much more smooth :)

Was this page helpful?
0 / 5 - 0 ratings