Documentation ¶
Index ¶
- Constants
- func CopyModifiersFromAst(t *ast.Type, base types.Type, omitSliceElementPointers bool, ...) types.Type
- 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, types []*Type, ptrTypes []PtrType, operations []*Operation, ...) error
- type Argument
- type FieldPath
- type MapField
- type Operation
- type OperationResponse
- type Plugin
- type PtrType
- type ResponseField
- type ResponseFieldList
- type Source
- type SourceGenerator
- func (r *SourceGenerator) AstTypeToType(path FieldPath, fields ResponseFieldList, typ *ast.Type) types.Type
- func (r *SourceGenerator) GenTypes() []*Type
- func (r *SourceGenerator) GetGenType(name string) *Type
- func (r *SourceGenerator) GetNamedType(fullname string) types.Type
- func (r *SourceGenerator) NewResponseField(path FieldPath, selection ast.Selection) *ResponseField
- func (r *SourceGenerator) NewResponseFields(path FieldPath, selectionSet *ast.SelectionSet) ResponseFieldList
- func (r *SourceGenerator) OperationArguments(variableDefinitions ast.VariableDefinitionList) []*Argument
- func (r *SourceGenerator) PtrTypes() []PtrType
- func (r *SourceGenerator) RegisterGenType(name string, typ *Type)
- type Type
- type TypeTarget
Constants ¶
View Source
const OperationKind ast.DefinitionKind = "OPERATION"
Variables ¶
This section is empty.
Functions ¶
func CopyModifiersFromAst ¶ added in v0.13.0
func LoadQuerySources ¶
LoadQuerySourceなどは、gqlgenがLoadConfigでSchemaを読み込む時の実装をコピーして一部修正している **/test/*.graphqlなどに対応している
func ParseQueryDocuments ¶
func QueryDocumentsByOperations ¶
func QueryDocumentsByOperations(schema *ast.Schema, operations ast.OperationList) ([]*ast.QueryDocument, error)
Types ¶
type FieldPath ¶
type FieldPath struct { Kind ast.DefinitionKind // contains filtered or unexported fields }
func NewFieldPath ¶
func NewFieldPath(kind ast.DefinitionKind, name string) FieldPath
type Operation ¶
type Operation struct { Name string ResponseType types.Type Operation string OperationType string Args []*Argument VariableDefinitions ast.VariableDefinitionList }
func NewOperation ¶
func NewOperation(operation *OperationResponse, queryDocument *ast.QueryDocument, args []*Argument) *Operation
type OperationResponse ¶
type OperationResponse struct { Operation *ast.OperationDefinition Name string Type types.Type }
type Plugin ¶
type Plugin struct { Client gqlgenCfg.PackageConfig GenerateConfig *config.GenerateConfig Cfg *config.Config // contains filtered or unexported fields }
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
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) ExtraTypes ¶
func (*Source) OperationResponses ¶
func (s *Source) OperationResponses() ([]*OperationResponse, error)
func (*Source) Operations ¶
func (s *Source) Operations(queryDocuments []*ast.QueryDocument, operationResponses []*OperationResponse) []*Operation
type SourceGenerator ¶
type SourceGenerator struct {
// contains filtered or unexported fields
}
func NewSourceGenerator ¶
func NewSourceGenerator(cfg *config.Config, ccfg *config2.Config, client config.PackageConfig) *SourceGenerator
func (*SourceGenerator) AstTypeToType ¶
func (r *SourceGenerator) AstTypeToType(path FieldPath, fields ResponseFieldList, typ *ast.Type) types.Type
func (*SourceGenerator) GenTypes ¶
func (r *SourceGenerator) GenTypes() []*Type
func (*SourceGenerator) GetGenType ¶
func (r *SourceGenerator) GetGenType(name string) *Type
func (*SourceGenerator) GetNamedType ¶
func (r *SourceGenerator) GetNamedType(fullname string) types.Type
func (*SourceGenerator) NewResponseField ¶
func (r *SourceGenerator) NewResponseField(path FieldPath, selection ast.Selection) *ResponseField
func (*SourceGenerator) NewResponseFields ¶
func (r *SourceGenerator) NewResponseFields(path FieldPath, selectionSet *ast.SelectionSet) ResponseFieldList
func (*SourceGenerator) OperationArguments ¶
func (r *SourceGenerator) OperationArguments(variableDefinitions ast.VariableDefinitionList) []*Argument
func (*SourceGenerator) PtrTypes ¶
func (r *SourceGenerator) PtrTypes() []PtrType
func (*SourceGenerator) RegisterGenType ¶
func (r *SourceGenerator) RegisterGenType(name string, typ *Type)
type Type ¶
type Type struct { Name string Path FieldPath Type types.Type UnmarshalTypes map[string]TypeTarget RefType *types.Named Consts []*types.Const MapReq []MapField MapOpt []MapField }
func (Type) IsInputMap ¶
type TypeTarget ¶
Click to show internal directories.
Click to hide internal directories.