genx

package
v0.0.0-...-1e7b23d Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeRelayNodeType

func ChangeRelayNodeType() entgql.SchemaHook

ChangeRelayNodeType is a schema hook for change relay node type to GID. Use with GlobalID().

add it to entgql.WithSchemaHook()

func DecimalHook

func DecimalHook() gen.Hook

func GlobalID

func GlobalID() entc.Option

GlobalID is a global id template for Noder Query. Use with ChangeRelayNodeType().

if you use GlobalID, must use GID as scalar type. and use ChangeRelayNodeType() in entgql.WithSchemaHook()

func ReplaceGqlMutationInput

func ReplaceGqlMutationInput() entgql.ExtensionOption

ReplaceGqlMutationInput is a schema hook for replace gql mutation input template. Deprecated: not use

func SimplePagination

func SimplePagination() entc.Option

func SkipTablesDiffHook

func SkipTablesDiffHook(tables ...string) schema.MigrateOption

SkipTablesDiffHook is a schema migration hook for skip tables diff thus skip migration. the table name is database name,not the ent schema struct name.

err = client.Schema.Create(ctx,SkipTablesDiffHook("table1","table2"))

func WithGqlWithTemplates

func WithGqlWithTemplates() entgql.ExtensionOption

WithGqlWithTemplates is a schema hook for replace entgql default template. Note: this option must put before WithWhereInputs or which changed entgql templates option.

extensions:

  1. NodeTemplate: Noder: add entcache context

Types

type DecimalExtension

type DecimalExtension struct {
	entc.DefaultExtension
}

func (DecimalExtension) Func

func (DecimalExtension) Hooks

func (DecimalExtension) Hooks() []gen.Hook

func (DecimalExtension) Templates

func (d DecimalExtension) Templates() []*gen.Template

Directories

Path Synopsis
integration module

Jump to

Keyboard shortcuts

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