codegen

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Package codegen owns the pinned gqlgen integration. Application modules do not carry gqlgen configuration and do not run a second generator.

Index

Constants

View Source
const (
	GraphQLABIVersion        = "p8-graphql-abi-v5"
	GoFilename               = "zz_golem_graphql.gen.go"
	SDLFilename              = "zz_golem_graphql.schema.graphqls"
	DefaultGolemImportPath   = "github.com/eleven-am/golem/go/golem"
	DefaultGraphQLImportPath = "github.com/eleven-am/golem/go/graphql"
)
View Source
const (
	ExecutablePackageDirectory = "golemgqlgen"
	ExecutableFilename         = "zz_golem_graphql_exec.gen.go"
	ModelsFilename             = "zz_golem_graphql_models.gen.go"
	ResolversFilename          = "zz_golem_graphql_resolvers.gen.go"
)
View Source
const GQLGenVersion = "v0.17.70"

GQLGenVersion participates in P5 generation identity and is changed only with the GraphQL golden, compile, execution, and determinism gates.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig() *config.Config

NewConfig returns a fresh upstream configuration that Golem will populate entirely in memory. Keeping construction here prevents ambient gqlgen.yml files from becoming schema authority.

Types

type GeneratedFile

type GeneratedFile struct {
	Filename string
	Source   []byte
}

type MutationModel

type MutationModel struct {
	PackagePath string
	GoName      string
}

type Request

type Request struct {
	PackageName         string
	AppImportPath       string
	ModuleDir           string
	Env                 []string
	SDL                 string
	ContractFingerprint ir.Fingerprint
	Actor               ir.GoNamedTypeIR
	MutationModels      []MutationModel
	Compilation         *ir.CompilationIR
	GolemImportPath     string
	GraphQLImportPath   string
	RuntimeImportPath   string
	GenerationDigest    string
	GeneratorVersion    string
	TemplateABIVersion  string
}

type Result

type Result struct {
	Filename       string
	Source         []byte
	Files          []GeneratedFile
	SDLFingerprint ir.Fingerprint
}

func Emit

func Emit(request Request) (Result, error)

Emit produces Golem's deterministic application-package server adapter. It assembles the public caller-only GraphQL executor with the generated App but contains no policy decision, SQL access, hook, or transaction behavior.

Jump to

Keyboard shortcuts

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