Documentation
¶
Overview ¶
Package resolvergen provides the a resolver template for the gqlgen resolver plugin to override the default resolver functions
Index ¶
Constants ¶
const ( CreateOperation = "Create" UpdateOperation = "Update" AddOperation = "Add" DeleteOperation = "Delete" InputObject = "Input" BulkOperation = "Bulk" CSVOperation = "CSV" BulkCSVOperation = "BulkCSV" UploadOperation = "Upload" Connection = "Connection" Payload = "Payload" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶ added in v0.4.8
type Options func(*ResolverPlugin)
Options is a function to set the options for the plugin
func WithArchivableSchemas ¶ added in v0.7.1
WithArchivableSchemas sets schemas that can have a status of archived
func WithEntGeneratedPackage ¶ added in v0.4.8
WithEntGeneratedPackage sets the ent generated package for imports
func WithExcludeCustomUpdateFields ¶ added in v0.4.9
func WithExcludeCustomUpdateFields() Options
WithExcludeCustomUpdateFields excludes custom resolver fields for updates resolvers
func WithGraphQLImport ¶ added in v0.13.0
WithGraphQLImport sets the import path for the graphql package
type ResolverPlugin ¶
type ResolverPlugin struct {
*resolvergen.Plugin
// contains filtered or unexported fields
}
ResolverPlugin is a gqlgen plugin to generate resolver functions
func NewWithOptions ¶ added in v0.4.8
func NewWithOptions(opts ...Options) *ResolverPlugin
NewWithOptions returns a new plugin with the given options
func (*ResolverPlugin) GenerateCode ¶
func (r *ResolverPlugin) GenerateCode(data *codegen.Data) error
GenerateCode implements api.CodeGenerator
func (*ResolverPlugin) Implement ¶
func (r *ResolverPlugin) Implement(s string, f *codegen.Field) (val string)
Implement gqlgen api.ResolverImplementer
func (ResolverPlugin) Name ¶
func (r ResolverPlugin) Name() string
Name returns the name of the plugin This name must match the upstream resolvergen to replace during code generation