edgeql-go

command
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

edgeql-go is a tool to generate go functions from edgeql queries.

When run in a Gel project directory or subdirectory an *_edgeql.go source file will be generated for each *.edgeql file. The generated go will have a query and queryJSON function with typed arguments and return value matching the query's arguments and result shape. For example if a directory contains a get_user.edgeql file, edgeql-go will create a get_user_edgeql.go file with a getUser(...) and getUserJSON(...) function.

Install

For go 1.24 and above:

go get -tool github.com/geldata/gel-go/cmd/edgeql-go@latest

For go 1.23 and below:

go install github.com/geldata/gel-go/cmd/edgeql-go@latest

Usage

Typically this process would be run using go generate. For go 1.24 and above:

//go:generate go tool edgeql-go -pubfuncs -pubtypes -mixedcaps -rawmessage

For go 1.23 and below:

//go:generate edgeql-go -pubfuncs -pubtypes -mixedcaps -rawmessage

For a complete list of options:

edgeql-go -help

Jump to

Keyboard shortcuts

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