schema

package
v1.1.65 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomGetter added in v1.1.28

func CustomGetter(opts ...CustomGetterOption) []entschema.Annotation

CustomGetter returns the FieldAnnotation and the entgql directive for forcing a resolver.

Types

type ActionDef

type ActionDef struct {
	Name           string
	WrapTxn        bool
	Type           ActionType
	NoArgs         bool
	NillableArgs   bool
	DocComment     string
	GenericEntType string
	IsDefault      bool
}

func NewAction

func NewAction(name string, actionType ActionType, setters ...ActionOption) *ActionDef

type ActionOption

type ActionOption func(*ActionDef)

func DocComment

func DocComment(comment string) ActionOption

func GenericEntType

func GenericEntType(entType string) ActionOption

func IsDefault

func IsDefault() ActionOption

func NillableArgs

func NillableArgs() ActionOption

func NoArgs

func NoArgs() ActionOption

func WrapTxn

func WrapTxn(wrap bool) ActionOption

type ActionType

type ActionType string
const (
	ActionCreate ActionType = "Create"
	ActionUpdate ActionType = "Update"
)

type CustomGetterOption added in v1.1.28

type CustomGetterOption func(*customGetter)

func WithContext added in v1.1.28

func WithContext() CustomGetterOption

type EntWithActions

type EntWithActions interface {
	Actions() []*ActionDef
}

type FieldAnnotation added in v1.1.28

type FieldAnnotation struct {
	CustomGetter *customGetter
}

func (FieldAnnotation) Name added in v1.1.28

func (f FieldAnnotation) Name() string

Jump to

Keyboard shortcuts

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