Documentation ¶
Overview ¶
Package searchgen provides the the ability to generate a search resolver
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SearchDirective = entgql.NewDirective("search")
Functions ¶
This section is empty.
Types ¶
type Object ¶
type Object struct { // Name of the object Name string // Fields of the object that are searchable Fields []genhooks.Field // AdminFields of the object that are searchable AdminFields []genhooks.Field }
Object is a struct to hold the object name for the bulk resolver
type SearchPlugin ¶
type SearchPlugin struct {
EntGeneratedPackage string
}
SearchPlugin is a gqlgen plugin to generate search functions
func (SearchPlugin) GenerateCode ¶
func (r SearchPlugin) GenerateCode(data *codegen.Data) error
GenerateCode implements api.CodeGenerator to generate the search resolver and it's helper functions
func (SearchPlugin) Name ¶
func (r SearchPlugin) Name() string
Name returns the name of the plugin This name must match the upstream resolvergen to replace during code generation
type SearchResolverBuild ¶
type SearchResolverBuild struct { // Name of the search type Name string // Objects is a list of objects to generate bulk resolvers for Objects []Object // EntPackageName is the ent generated package that holds the generated types EntPackageName string }
SearchResolverBuild is a struct to hold the objects for the bulk resolver
Click to show internal directories.
Click to hide internal directories.