Documentation
¶
Overview ¶
Package bind lowers already-coerced GraphQL inputs into the existing P2/P3 request IR. Public GraphQL names are resolved exactly once against ContractIR; no name survives into authorization, planning, or SQL rendering.
Index ¶
- type Binder
- func (b *Binder) Child(target compilerir.ModelID, field *ast.Field, selections []readir.Selection, ...) (readir.Request, error)
- func (b *Binder) Count(target compilerir.ModelID, field *ast.Field, variables map[string]any) (readir.Request, error)
- func (b *Binder) FreezePredicate(condition policyir.Condition) (golem.FrozenPredicate, error)
- func (b *Binder) MutationSelector(modelID compilerir.ModelID, raw any) (readir.Selector, policyir.Condition, error)
- func (b *Binder) MutationValue(modelID compilerir.ModelID, fieldID compilerir.FieldID, raw any) (policyir.Value, error)
- func (b *Binder) MutationWhere(modelID compilerir.ModelID, raw any) (policyir.Condition, error)
- func (b *Binder) Query(input QueryInput) (readir.Request, error)
- type Limits
- type QueryInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binder ¶
type Binder struct {
// contains filtered or unexported fields
}
func New ¶
func New(compilation compilerir.CompilationIR, limits Limits) (*Binder, error)
func (*Binder) Child ¶
func (b *Binder) Child(target compilerir.ModelID, field *ast.Field, selections []readir.Selection, variables map[string]any) (readir.Request, error)
Child compiles arguments on a selected to-many relation into a P3 request. It is suitable for selectset.Request.Child.
func (*Binder) Count ¶
func (b *Binder) Count(target compilerir.ModelID, field *ast.Field, variables map[string]any) (readir.Request, error)
Count compiles the optional where argument on a relation count into the same P3 Count request used by generated Go callers.
func (*Binder) FreezePredicate ¶
FreezePredicate converts an already-bound P2 condition into the frozen public predicate boundary shared by P3/P4 runtime adapters. Scalar parsing, enum GraphQL-name resolution, provider/operator validation, and resource limits have already run in Binder; the conversion preserves their exact value and stable-identity result without reinterpreting public names.
func (*Binder) MutationSelector ¶
func (b *Binder) MutationSelector(modelID compilerir.ModelID, raw any) (readir.Selector, policyir.Condition, error)
MutationSelector binds a GraphQL unique-selector map without manufacturing a read projection. P5-E uses the same exact scalar and selector machinery as P5-C, then freezes the result at P4's mutation boundary.
func (*Binder) MutationValue ¶
func (b *Binder) MutationValue(modelID compilerir.ModelID, fieldID compilerir.FieldID, raw any) (policyir.Value, error)
MutationValue applies the same exact GraphQL scalar/enum/list/JSON coercion used by P5-C filters, but returns P2's exact immutable value for P4 input binding. No public name or float64 approximation crosses this boundary.
func (*Binder) MutationWhere ¶
MutationWhere binds a GraphQL batch/nested where map through the same P2 condition vocabulary, provider checks, exact values, and public limits as a P5-C read filter.