You are viewing documentation for a previous version of this software.

Switch to the latest stable version.

ApolloCodegen


CLASS

ApolloCodegen

Swift
1public class ApolloCodegen

A class to facilitate running code generation

Methods

run(from:with:options:)

Swift
1public static func run(from folder: URL,
2                       with cliFolderURL: URL,
3                       options: ApolloCodegenOptions) throws -> String

Runs code generation from the given folder with the passed-in options

  • Parameters:

    • folder: The folder to run the script from. Should be the folder that at some depth, contains all .graphql files.

    • cliFolderURL: The folder where the Apollo CLI is/should be downloaded.

    • options: The options object to use to run the code generation.

  • Returns: Output from a successful run

Parameters

NameDescription
folderThe folder to run the script from. Should be the folder that at some depth, contains all .graphql files.
cliFolderURLThe folder where the Apollo CLI is/should be downloaded.
optionsThe options object to use to run the code generation.
Feedback

Edit on GitHub

Forums