ent_graphql_go

package module
v0.0.0-...-ef759c8 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GraphFilter = loadLocalTpl("templates/graphers_filter.tmpl")
View Source
var GraphQuery = loadLocalTpl("templates/graphers_query.tmpl")
View Source
var GraphTypes = loadLocalTpl("templates/graphers_types.tmpl")
View Source
var (
	TemplateFuncs = template.FuncMap{
		"HasType":       hasType,
		"GqlType":       gqlType,
		"GqlTypeString": gqlTypeString,
		"IsOutput":      ouputField,
		"IsCreate":      createField,
		"IsUpdate":      updateField,
		"IsInterface":   isInterface,
	}
)

Functions

func NewExtension

func NewExtension() entc.Extension

Types

type Annotation

type Annotation struct {
	Type graphql.Type

	SkipOutput bool
	SkipCreate bool
	SkipUpdate bool

	IsInterface bool
}

Annotation annotates fields and edges with metadata for templates.

func IsInterface

func IsInterface() Annotation

func SkipAll

func SkipAll() Annotation

func SkipCreate

func SkipCreate() Annotation

func SkipOutput

func SkipOutput() Annotation

func SkipUpdate

func SkipUpdate() Annotation

func Type

func Type(t graphql.Type) Annotation

func (Annotation) Name

func (Annotation) Name() string

type EntGraphers

type EntGraphers struct {
	entc.DefaultExtension
}

func (EntGraphers) Annotations

func (EntGraphers) Annotations() []schema.Annotation

func (EntGraphers) Templates

func (EntGraphers) Templates() []*gen.Template

Directories

Path Synopsis
lib

Jump to

Keyboard shortcuts

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