How to use the apollo-codegen-scala.generateSource function in apollo-codegen-scala

To help you get started, we’ve selected a few apollo-codegen-scala 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 / generate.ts View on Github external
generatedFiles.map(o => o.content().fileContents).join("\n") +
          "\n" +
          generatedGlobalFile.fileContents
      );

      writtenFiles += 1;
    }
  } else {
    let output;
    const context = compileToLegacyIR(schema, document, options);
    switch (target) {
      case "json":
        output = serializeToJSON(context);
        break;
      case "scala":
        output = generateScalaSource(context);
    }

    if (outputPath) {
      fs.writeFileSync(outputPath, output);
      writtenFiles += 1;
    } else {
      console.log(output);
    }
  }

  return writtenFiles;
}

apollo-codegen-scala

Scala generator module for Apollo Codegen

MIT
Latest version published 3 years ago

Package Health Score

64 / 100
Full package analysis

Popular apollo-codegen-scala functions

Similar packages