How to use the apollo/lib/engine.getIdFromKey function in apollo

To help you get started, we’ve selected a few apollo 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-language-server / src / project.ts View on Github external
) {
    // FIXME: This should take includes and excludes from the new config format.
    const queries = config.queries![0];

    this.fileSet = new FileSet({
      rootPath: config.projectFolder,
      includes: queries.includes,
      excludes: queries.excludes
    });

    this.loadSchema();
    this.scanAllIncludedFiles();

    const engineKey = process.env.ENGINE_API_KEY;
    if (engineKey) {
      this.serviceID = getIdFromKey(engineKey);

      this.engineClient = new ApolloEngineClient(
        engineKey,
        this.config.engineEndpoint
      );
      this.loadEngineData();
    } else {
      this.loadingHandler.showError(
        "Apollo: failed to load Engine stats. No ENGINE_API_KEY found in .env"
      );
    }
  }