Packages

package codegen

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. codegen
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class ApolloSourceGenerator(fileName: String, additionalImports: List[Import], additionalInits: List[Init], jsonCodeGen: JsonCodeGen) extends Generator[List[Stat]] with Product with Serializable

    Generate code using Scalameta.

  2. case class CodeGenContext(schema: Schema[Any, Any], targetDirectory: File, graphQLFiles: Seq[File], packageName: String, moduleName: String, jsonCodeGen: JsonCodeGen, imports: Seq[String], preProcessors: Seq[PreProcessor], log: sbt.Logger) extends Product with Serializable

    Initial context to kickoff code generation.

    CodeGen Context

    Initial context to kickoff code generation.

    schema

    the graphql schema

    targetDirectory

    the target directory where the source code will be placed

    graphQLFiles

    input files that should be processed

    packageName

    the scala package name

    moduleName

    optional module name for single-file based generators

    imports

    list of imports to be added to the generated file

    preProcessors

    pre processors that should be applied before the graphql file is parsed

    log

    output log

  3. case class Failure(message: String) extends Exception with Product with Serializable

    A generic error type for codegen failures.

  4. trait Generator[T] extends (Api) ⇒ Result[T]

    Generate a result from the loaded tree.

  5. trait JsonCodeGen extends AnyRef

    JsonCodeGen

  6. type PreProcessor = (String) ⇒ Result[String]

    Type alias for a graphql file pre-processing function.

    Type alias for a graphql file pre-processing function. _ The input is the raw graphql file content _ The output is the transformed graphql file content or an error

  7. type Result[T] = Either[Failure, T]

    Type alias for a processing result during a code generation step

  8. case class ScalametaGenerator(moduleName: Name, emitInterfaces: Boolean = false, stats: List[Stat] = List.empty) extends Generator[Object] with Product with Serializable

    Generate code using Scalameta.

  9. sealed trait TypedDocument extends AnyRef

    AST representing the extracted GraphQL types.

  10. case class TypedDocumentParser(schema: Schema[_, _], document: Document) extends Product with Serializable

Value Members

  1. object CodeGenStyles

    Object that contains different code generation styles

    CodeGen Styles

    Object that contains different code generation styles

  2. object DocumentLoader
  3. object Failure extends Serializable
  4. object GraphQLQueryGenerator

    Provides a GraphQLQuery trait.

    Provides a GraphQLQuery trait. This is heavily inspired by the apollo scalajs code generator.

    trait GraphQLQuery {
       // the input variables
       type Variables
    
       // the returned data
       type Data
    
       // the document that should be executed
       val document: sangria.ast.Document
    }
  5. object JsonCodeGens
  6. object PreProcessors
  7. object ScalametaGenerator extends Serializable
  8. object ScalametaUtils

    More robust way to parse Type.Ref and Term.Ref from String.

    More robust way to parse Type.Ref and Term.Ref from String.

    See also

    More discussion: https://gitter.im/scalameta/scalameta?at=5b9ba14f8909f71f75d1b4bd

    https://astexplorer.net/#/gist/ec56167ffafb20cbd8d68f24a37043a9/677e43f3adb93db8513dbe4e2c868dd4f78df4b3

  9. object SourceCodeWriter

    Writes scalameta ASTs to scala source files.

    Source Code Writer

    Writes scalameta ASTs to scala source files.

  10. object TypedDocument

Inherited from AnyRef

Inherited from Any

Ungrouped