Documentation
¶
Overview ¶
Package nestedmutations is a built-in plugin exercising every hook surface: it adds nested `create`/`connect` input fields on create-mutation inputs following foreign keys (SchemaHook), compiles them into a single multi-CTE SQL statement respecting FK direction and insertion order (CompileHook), and forces a transaction for nested mutations even when transactions are globally disabled (RequestHook), unless plugins.nested-mutations.force_transactions is false.
Index ¶
- type Plugin
- func (p *Plugin) AfterOperation(context.Context, *exec.Operation, *exec.Result)
- func (p *Plugin) BeforeOperation(ctx context.Context, op *exec.Operation) (context.Context, error)
- func (p *Plugin) Name() string
- func (p *Plugin) Priority() int
- func (p *Plugin) TransformSchema(_ context.Context, b *schema.Builder) error
- func (p *Plugin) WrapCompile(next compile.Func) compile.Func
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) AfterOperation ¶
func (*Plugin) BeforeOperation ¶
BeforeOperation forces a transaction when the operation uses nested mutation inputs (unless force_transactions is disabled).
func (*Plugin) TransformSchema ¶
Click to show internal directories.
Click to hide internal directories.