genhelpers

package
v2.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLoadPackages = errors.New("failed to load packages")

ErrLoadPackages is returned when Go packages cannot be loaded for comment extraction

Functions

func ChangeToRootDir

func ChangeToRootDir(rootDir string)

ChangeToRootDir changes the working directory to the root of the repository

func HasSchemaChanges

func HasSchemaChanges(checksumFile string, directories ...string) (bool, error)

HasSchemaChanges checks if there have been changes to schema or generated files by comparing checksums of the relevant directories

func LoadCommentMap

func LoadCommentMap(patterns ...string) (map[string]string, error)

LoadCommentMap parses the packages matched by the given patterns and returns their Go doc comments keyed by "pkgpath.TypeName" for type declarations and "pkgpath.TypeName.FieldName" for exported struct fields; the key format is shared by the jsonschema reflector comment map and the OpenAPI schema customizer so both generators source descriptions the same way

func PruneWhereInputOps

func PruneWhereInputOps() entgql.SchemaHook

PruneWhereInputOps removes the predicate fields listed in droppedWhereOps from every generated where input. A field is only removed when the same input also declares its base field, so a real schema field whose name happens to end in an op suffix is left alone

func SetSchemaChecksum

func SetSchemaChecksum(checksumFile string, paths ...string) error

SetSchemaChecksum updates the checksum file with the current checksum

func SetupLogging

func SetupLogging()

SetupLogging sets up the logging for the code generation process

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL