Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Codegen ¶
func Codegen(schema string, config ModelMapping) ([]byte, []byte, error)
Codegen takes a GraphQL schema as well as a mapping file of GQL structs to DB structs, then returns a generated REST model with conversion code, as well as utility code to convert between pointers
func SetGeneratePathPrefix ¶
func SetGeneratePathPrefix(prefix string)
SetGeneratePathPrefix allows callers outside this package to set the path to this package, since it uses relative paths for all the templates
Types ¶
type ModelMapping ¶
ModelMapping maps schema type names to their respective DB model
Click to show internal directories.
Click to hide internal directories.