Codegen​
edgeql-go is a tool to generate go functions from edgeql queries. When run in a Gel project directory (or subdirectory) a *_edgeql.go source file will be generated for each *.edgeql file. The generated go will have an edgeqlFileName and edgeqlFileNameJSON function with typed arguments and return value matching the query's arguments and result shape.
Install​
Copy
go install github.com/geldata/gel-go/cmd/edgeql-go@latest
See also pinning tool dependencies.
Usage​
Typically this process would be run using go generate like this:
Copy
//go:generate edgeql-go -pubfuncs -pubtypes -mixedcaps
For a complete list of options:
Copy
edgeql-go -help