Documentation ¶
Index ¶
- func LoadQuerySources(queryFileNames []string) ([]*ast.Source, error)
- func ParseQueryDocuments(schema *ast.Schema, querySources []*ast.Source, ...) (*ast.QueryDocument, error)
- func QueryDocumentsByOperations(schema *ast.Schema, operations ast.OperationList) ([]*ast.QueryDocument, error)
- func RenderTemplate(cfg *config.Config, query *Query, mutation *Mutation, fragments []*Fragment, ...) error
- type Argument
- type Fragment
- type Mutation
- type Operation
- type OperationResponse
- type Plugin
- type Query
- type ResponseField
- type ResponseFieldList
- type Source
- type SourceGenerator
- func (r *SourceGenerator) NewResponseField(selection ast.Selection) *ResponseField
- func (r *SourceGenerator) NewResponseFields(selectionSet ast.SelectionSet) ResponseFieldList
- func (r *SourceGenerator) NewResponseFieldsByDefinition(definition *ast.Definition) (ResponseFieldList, error)
- func (r *SourceGenerator) OperationArguments(variableDefinitions ast.VariableDefinitionList) []*Argument
- func (r *SourceGenerator) Type(typeName string) types.Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadQuerySources ¶
LoadQuerySourceなどは、gqlgenがLoadConfigでSchemaを読み込む時の実装をコピーして一部修正している **/test/*.graphqlなどに対応している
func ParseQueryDocuments ¶
func ParseQueryDocuments(schema *ast.Schema, querySources []*ast.Source, generateConfig *config.GenerateConfig) (*ast.QueryDocument, error)
func QueryDocumentsByOperations ¶
func QueryDocumentsByOperations(schema *ast.Schema, operations ast.OperationList) ([]*ast.QueryDocument, error)
func RenderTemplate ¶
func RenderTemplate(cfg *config.Config, query *Query, mutation *Mutation, fragments []*Fragment, operations []*Operation, operationResponses []*OperationResponse, generateCfg *config2.GenerateConfig, client config.PackageConfig) error
Types ¶
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, 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) 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)
type SourceGenerator ¶
type SourceGenerator struct {
// 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) *ResponseField
func (*SourceGenerator) NewResponseFields ¶
func (r *SourceGenerator) NewResponseFields(selectionSet ast.SelectionSet) ResponseFieldList
func (*SourceGenerator) NewResponseFieldsByDefinition ¶
func (r *SourceGenerator) NewResponseFieldsByDefinition(definition *ast.Definition) (ResponseFieldList, error)
func (*SourceGenerator) OperationArguments ¶
func (r *SourceGenerator) OperationArguments(variableDefinitions ast.VariableDefinitionList) []*Argument
Click to show internal directories.
Click to hide internal directories.