~bigbes/sr-ht-dolt

ref: 12c7ff77f8281cd0ca61177bcf07b9c031a04c97 sr-ht-dolt/graph/generate.go -rw-r--r-- 1.0 KiB
12c7ff77 — Eugene Blikh ci: publish this build's own coverage and benchmarks 2 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package graph

// Code generation. gqlgen reads gqlgen.yml in this directory and rewrites
// api/generated.go, model/models_gen.go and the stubs in schema.resolvers.go;
// implementations already in that file are carried through untouched.
//
// It is pinned to the same version this module requires, and run as a
// module-independent `go run …@v`, so the codegen dependency tree — a CLI
// framework, the Go analysis packages — stays out of this service's go.mod and
// go.sum entirely.
//
// That form does not work with every gqlgen: spec.sr.ht records that
// v0.17.36 cannot be run this way, and it still cannot — its module pins
// golang.org/x/tools v0.9.3, which this toolchain refuses to compile ("invalid
// array length -delta * delta"). v0.17.94 pins a version that does. If a bump
// ever brings that failure back, the fallback is `go get -tool` and `go tool
// gqlgen`, which resolves the tool through this module's own graph at the cost
// of a tool block in go.mod.
//
//go:generate go run github.com/99designs/gqlgen@v0.17.94 generate