Documentation ¶
Index ¶
- Constants
- func FormatTS(cfg *Config) error
- type ChangeType
- type CodegenConfig
- type Config
- func (cfg *Config) AppendPathToModels(paths ...string) string
- func (cfg *Config) Base64EncodeIDs() bool
- func (cfg *Config) DebugMode() bool
- func (cfg *Config) DisableBase64Encoding() bool
- func (cfg *Config) DisableGraphQLRoot() bool
- func (cfg *Config) GenerateNodeQuery() bool
- func (cfg *Config) GenerateRootResolvers() bool
- func (cfg *Config) GeneratedHeader() string
- func (cfg *Config) GetAbsPathToGraphQL() string
- func (cfg *Config) GetAbsPathToModels() string
- func (cfg *Config) GetAbsPathToRoot() string
- func (cfg *Config) GetDefaultActionPolicy() *PrivacyConfig
- func (cfg *Config) GetDefaultEntPolicy() *PrivacyConfig
- func (cfg *Config) GetImportPackage() *ImportPackage
- func (cfg *Config) GetImportPathToGraphQL() string
- func (cfg *Config) GetImportPathToModels() string
- func (cfg *Config) GetImportPathToRoot() string
- func (cfg *Config) GetPrettierArgs() []string
- func (cfg *Config) GetQuotedImportPathToConfigs() string
- func (cfg *Config) GetQuotedImportPathToModels() string
- func (cfg *Config) GetRelativePathToConfigs() string
- func (cfg *Config) GetRootPathToConfigs() string
- func (cfg *Config) OverrideImportPathToModels(importPath string)
- func (cfg *Config) SetDebugMode(debugMode bool)
- func (cfg *Config) ShouldUseRelativePaths() bool
- type ImportPackage
- type Option
- type PrettierConfig
- type PrivacyConfig
- type Processor
- type Step
- type StepWithPreProcess
Constants ¶
View Source
const DEFAULT_GLOB = "src/**/*.ts"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChangeType ¶
type ChangeType string
const ( AddTable ChangeType = "add_table" DropTable ChangeType = "drop_table" AddColumn ChangeType = "add_column" DropColumn ChangeType = "drop_column" CreateIndex ChangeType = "create_index" DropIndex ChangeType = "drop_index" CreateForeignKey ChangeType = "create_foreign_key" AlterColumn ChangeType = "alter_column" CreateUniqueConstraint ChangeType = "create_unique_constraint" AddEdges ChangeType = "add_edges" RemoveEdges ChangeType = "remove_edges" ModifyEdge ChangeType = "modify_edge" AddRows ChangeType = "add_rows" RemoveRows ChangeType = "remove_rows" ModifyRows ChangeType = "modify_rows" AlterEnum ChangeType = "alter_enum" AddEnum ChangeType = "add_enum" DropEnum ChangeType = "drop_enum" CreateCheckConstraint ChangeType = "create_check_constraint" DropCheckConstraint ChangeType = "drop_check_constraint" )
note these need to be in sync with change_type in auto_schema/change_type.py
type CodegenConfig ¶
type CodegenConfig struct { DefaultEntPolicy *PrivacyConfig `yaml:"defaultEntPolicy"` DefaultActionPolicy *PrivacyConfig `yaml:"defaultActionPolicy"` Prettier *PrettierConfig `yaml:"prettier"` RelativeImports bool `yaml:"relativeImports"` DisableGraphQLRoot bool `yaml:"disableGraphQLRoot"` GeneratedHeader string `yaml:"generatedHeader"` DisableBase64Encoding bool `yaml:"disableBase64Encoding"` GenerateRootResolvers bool `yaml:"generateRootResolvers"` }
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is codegen info/config which is used to pass things down the line
func NewTestConfig ¶
func NewTestConfig(configPath, modulePath string, codegenCfg *CodegenConfig) (*Config, error)
func (*Config) AppendPathToModels ¶
used by golang
func (*Config) Base64EncodeIDs ¶ added in v0.0.30
func (*Config) DisableBase64Encoding ¶ added in v0.0.30
func (*Config) DisableGraphQLRoot ¶
func (*Config) GenerateNodeQuery ¶ added in v0.0.30
func (*Config) GenerateRootResolvers ¶ added in v0.0.30
func (*Config) GeneratedHeader ¶
func (*Config) GetAbsPathToRoot ¶
func (*Config) GetDefaultActionPolicy ¶
func (cfg *Config) GetDefaultActionPolicy() *PrivacyConfig
func (*Config) GetDefaultEntPolicy ¶
func (cfg *Config) GetDefaultEntPolicy() *PrivacyConfig
func (*Config) GetImportPackage ¶
func (cfg *Config) GetImportPackage() *ImportPackage
func (*Config) GetImportPathToGraphQL ¶
func (*Config) GetImportPathToModels ¶
func (*Config) GetImportPathToRoot ¶
func (*Config) GetPrettierArgs ¶
func (*Config) GetQuotedImportPathToConfigs ¶
func (*Config) GetQuotedImportPathToModels ¶
func (*Config) GetRelativePathToConfigs ¶
func (*Config) GetRootPathToConfigs ¶
func (*Config) OverrideImportPathToModels ¶
func (*Config) SetDebugMode ¶
func (*Config) ShouldUseRelativePaths ¶
type ImportPackage ¶
type ImportPackage struct { PackagePath string AuthPackagePath string ActionPackagePath string SchemaPackagePath string GraphQLPackagePath string InternalImportPath string ExternalImportPath string }
ImportPackage refers to TypeScript paths of what needs to be generated for imports
type Option ¶
type Option func(*option)
func DisableCustomGraphQL ¶
func DisableCustomGraphQL() Option
func DisableFormat ¶
func DisableFormat() Option
func DisablePrompts ¶
func DisablePrompts() Option
func DisableSchemaGQL ¶
func DisableSchemaGQL() Option
type PrettierConfig ¶
type PrivacyConfig ¶
type Processor ¶
type Processor struct { Schema *schema.Schema Config *Config // contains filtered or unexported fields }
Processor stores the parsed data needed for codegen
func NewCodegenProcessor ¶
func NewTestCodegenProcessor ¶
func (*Processor) DisableCustomGraphQL ¶
func (*Processor) DisableSchemaGQL ¶
func (*Processor) NoDBChanges ¶
type StepWithPreProcess ¶
Click to show internal directories.
Click to hide internal directories.