Documentation ¶
Index ¶
- func IsUniqueName(os ast.OperationList) error
- func NewLayerTypeName(base, thisField string) string
- func RenderTemplate(cfg *config.Config, fragments []*Fragment, operations []*Operation, ...) error
- func ValidateOperationList(os ast.OperationList) error
- type Argument
- type Fragment
- type GenGettersGenerator
- type Operation
- type OperationResponse
- type Plugin
- type ResponseField
- type ResponseFieldList
- type Source
- type SourceGenerator
- func (r *SourceGenerator) NewResponseField(selection ast.Selection, typeName string) *ResponseField
- func (r *SourceGenerator) NewResponseFields(selectionSet ast.SelectionSet, typeName string) ResponseFieldList
- func (r *SourceGenerator) OperationArguments(variableDefinitions ast.VariableDefinitionList) []*Argument
- func (r *SourceGenerator) Type(typeName string) types.Type
- type StructSource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsUniqueName ¶ added in v0.0.3
func IsUniqueName(os ast.OperationList) error
func NewLayerTypeName ¶ added in v0.0.3
func RenderTemplate ¶
func RenderTemplate(cfg *config.Config, fragments []*Fragment, operations []*Operation, operationResponses []*OperationResponse, structSources []*StructSource, generateCfg *gqlgencConfig.GenerateConfig, client config.PackageConfig) error
func ValidateOperationList ¶ added in v0.0.3
func ValidateOperationList(os ast.OperationList) error
Types ¶
type GenGettersGenerator ¶ added in v0.13.4
type GenGettersGenerator struct {
ClientPackageName string
}
type Operation ¶
type Operation struct { Name string ResponseStructName string Operation string Args []*Argument VariableDefinitions ast.VariableDefinitionList }
func NewOperation ¶
func NewOperation(operation *ast.OperationDefinition, queryDocument *ast.QueryDocument, args []*Argument, generateConfig *config.GenerateConfig) *Operation
type OperationResponse ¶
type Plugin ¶
type Plugin struct { Client config.PackageConfig GenerateConfig *gqlgencConfig.GenerateConfig // contains filtered or unexported fields }
func New ¶
func New(queryFilePaths []string, queryDocument *ast.QueryDocument, operationQueryDocuments []*ast.QueryDocument, client config.PackageConfig, generateConfig *gqlgencConfig.GenerateConfig) *Plugin
type ResponseField ¶
type ResponseFieldList ¶
type ResponseFieldList []*ResponseField
func (ResponseFieldList) IsBasicType ¶
func (rs ResponseFieldList) IsBasicType() bool
func (ResponseFieldList) IsFragment ¶
func (rs ResponseFieldList) IsFragment() bool
func (ResponseFieldList) IsFragmentSpread ¶ added in v0.0.4
func (rs ResponseFieldList) IsFragmentSpread() bool
func (ResponseFieldList) IsStructType ¶
func (rs ResponseFieldList) IsStructType() bool
func (ResponseFieldList) StructType ¶
func (rs ResponseFieldList) StructType() *types.Struct
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
func NewSource ¶
func NewSource(schema *ast.Schema, queryDocument *ast.QueryDocument, sourceGenerator *SourceGenerator, generateConfig *config.GenerateConfig) *Source
func (*Source) OperationResponses ¶
func (s *Source) OperationResponses() ([]*OperationResponse, error)
func (*Source) Operations ¶
func (s *Source) Operations(queryDocuments []*ast.QueryDocument) ([]*Operation, error)
func (*Source) ResponseSubTypes ¶ added in v0.0.3
func (s *Source) ResponseSubTypes() []*StructSource
type SourceGenerator ¶
type SourceGenerator struct { StructSources []*StructSource // contains filtered or unexported fields }
func NewSourceGenerator ¶
func NewSourceGenerator(cfg *config.Config, client config.PackageConfig) *SourceGenerator
func (*SourceGenerator) NewResponseField ¶
func (r *SourceGenerator) NewResponseField(selection ast.Selection, typeName string) *ResponseField
func (*SourceGenerator) NewResponseFields ¶
func (r *SourceGenerator) NewResponseFields(selectionSet ast.SelectionSet, typeName string) ResponseFieldList
func (*SourceGenerator) OperationArguments ¶
func (r *SourceGenerator) OperationArguments(variableDefinitions ast.VariableDefinitionList) []*Argument
type StructSource ¶ added in v0.0.3
Click to show internal directories.
Click to hide internal directories.