Skip to content

apollo-vscode: Cannot use local schema file #669

@stnwk

Description

@stnwk

Hi everyone!

I was just trying to figure out how to configure the new VSCode Extension, but I simply couldn't manage to do so.

That's my situation:

  • installed apollo 2.0.5 - reloaded everything
  • not using Apollo Engine
  • cannot use an actual api endpoint (because of auth)
  • local schema file available in JSON
  • All my graphql files are under src/**

How do I successfully configure this in my apollo.config.js? I've tried everything but somehow it never works.

module.exports = {
  service: {
    localSchemaFile: './internals/schema.graphql',
  },
};

^ This config does not output anything in the debug view.

module.exports = {
  client: {
    service: {
      localSchemaFile: './internals/schema.graphql',
    },
  }
};

^ This config outputs TypeError: Only absolute URLs are supported - welp

Additionally I receive the following error although I don't wan't to use the Apollo Engine related stuff..
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: Unable to find ENGINE_API_KEY

Can someone help me? The docs weren't really helpful about this :(

Might be related to #667 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions