Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultGenerateOutputFile = "types.go"
)
Variables ¶
View Source
var Command = &cobra.Command{ Use: "generate", Short: "Generate code from GraphQL Schema", Long: `Generate code from GraphQL Schema The generate command will generate code based on the configured types in your .tutone.yml configuration file. Use the --refetch flag when new types have been added to your upstream GraphQL schema to ensure your generated code is up to date with your configured GraphQL API. `, Example: "tutone generate --config .tutone.yml", Run: func(cmd *cobra.Command, args []string) { util.LogIfError(log.ErrorLevel, Generate(GeneratorOptions{ PackageName: packageName, Refetch: refetch, })) }, }
Functions ¶
func Generate ¶
func Generate(options GeneratorOptions) error
Generate reads the configuration file and executes generators relevant to a particular package.
Types ¶
type GeneratorOptions ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.