Documentation ¶
Index ¶
- type Import
- type MutationType
- type Option
- type ResolverPlugin
- func (r *ResolverPlugin) FormatFile(path string) error
- func (r *ResolverPlugin) GenerateCode(data *codegen.Data) error
- func (r *ResolverPlugin) Implement(prevImplementation string, f *codegen.Field) (val string)
- func (r *ResolverPlugin) Mutation(f *codegen.Field) (string, error)
- func (r *ResolverPlugin) Name() string
- func (r *ResolverPlugin) OverrideResolverStruct(config *config.Config) error
- func (r *ResolverPlugin) Query(f *codegen.Field) (string, error)
- type Rewriter
- func (r *Rewriter) ExistingImports(filename string) []Import
- func (r *Rewriter) GetMethodBody(structname, methodname string) string
- func (r *Rewriter) GetMethodComment(structname, methodname string) string
- func (r *Rewriter) GetPrevDecl(structname, methodname string) *ast.FuncDecl
- func (r *Rewriter) MarkStructCopied(name string)
- func (r *Rewriter) RemainingSource(filename string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MutationType ¶
type MutationType int
const ( MutationCreate MutationType = iota MutationUpdate MutationDelete )
type Option ¶
type Option func(*ResolverPlugin)
func WithConfig ¶
WithConfig set config for resolver plugin. in v0.17.41 need the config. so add this method for compatible.
func WithRelayNodeEx ¶
func WithRelayNodeEx() Option
WithRelayNodeEx enable relay node extended by globalID.
type ResolverPlugin ¶
type ResolverPlugin struct {
// contains filtered or unexported fields
}
func NewResolverPlugin ¶
func NewResolverPlugin(opt ...Option) *ResolverPlugin
func (*ResolverPlugin) FormatFile ¶
func (r *ResolverPlugin) FormatFile(path string) error
func (*ResolverPlugin) GenerateCode ¶
func (r *ResolverPlugin) GenerateCode(data *codegen.Data) error
GenerateCode implement api.CodeGenerator
func (*ResolverPlugin) Implement ¶
func (r *ResolverPlugin) Implement(prevImplementation string, f *codegen.Field) (val string)
Implement gqlgen api.ResolverImplementer
func (*ResolverPlugin) Mutation ¶
func (r *ResolverPlugin) Mutation(f *codegen.Field) (string, error)
func (*ResolverPlugin) Name ¶
func (r *ResolverPlugin) Name() string
func (*ResolverPlugin) OverrideResolverStruct ¶
func (r *ResolverPlugin) OverrideResolverStruct(config *config.Config) error
type Rewriter ¶
type Rewriter struct {
// contains filtered or unexported fields
}
func NewRewriter ¶
func (*Rewriter) ExistingImports ¶
func (*Rewriter) GetMethodBody ¶
func (*Rewriter) GetMethodComment ¶
func (*Rewriter) GetPrevDecl ¶
func (*Rewriter) MarkStructCopied ¶
func (*Rewriter) RemainingSource ¶
Click to show internal directories.
Click to hide internal directories.