How to use the apollo-language-server.Debug.error 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 / commands / client / codegen.ts View on Github external
watcher.on("all", (event, file) => {
        // don't trigger write events for generated file changes
        if (file.indexOf("__generated__") > -1) return;
        // don't trigger write events on single output file
        if (file.indexOf(output) > -1) return;
        this.project.fileDidChange(URI.file(file).toString());
        console.log("\nChange detected, generating types...");
        try {
          const fileCount = write();
          console.log(`${chalk.green("✔")} Wrote ${fileCount} files`);
        } catch (e) {
          Debug.error("Error while generating types: " + e.message);
        }
      });
      if (tty.isatty((process.stdin as any).fd)) {