How to use the apollo-language-server.Debug.SetLoggers function in apollo-language-server

To help you get started, we’ve selected a few apollo-language-server examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apollographql / apollo-tooling / packages / apollo / src / NewCommand.tsx View on Github external
async init() {
    // tell the language server to use the built-in loggers
    // from oclif
    Debug.SetLoggers({
      info: this.log,
      warning: this.warn,
      error: console.error
    });
  }
github apollographql / apollo-tooling / packages / apollo / src / Command.ts View on Github external
async init() {
    const { flags, args } = this.parse(this.constructor as any);
    this.ctx = { flags, args } as any;

    // tell the language server to use the built-in loggers
    // from oclif
    Debug.SetLoggers({
      info: this.log,
      warning: this.warn,
      error: console.error
    });

    const config = await this.createConfig(flags);
    if (!config) return;

    this.createService(config, flags);
    this.ctx.config = config;

    // make sure this the first item in the task list
    // XXX Somehow this task gets pushed onto the stack multiple times sometimes
    this.tasks.push({
      title: "Loading Apollo Project",
      task: async ctx => {