Documentation
¶
Index ¶
- func Generate(cfg Config) error
- type BindError
- type BindErrors
- type Build
- type Config
- type Enum
- type EnumValue
- type Field
- type FieldArgument
- type Import
- type Imports
- type Interface
- type InterfaceImplementor
- type Model
- type ModelBuild
- type ModelField
- type NamedType
- type NamedTypes
- type Object
- type Objects
- type PackageConfig
- type Ref
- type Type
- type TypeMap
- type TypeMapEntry
- type TypeMapField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BindErrors ¶
type BindErrors []BindError
func (BindErrors) Error ¶
func (b BindErrors) Error() string
type Config ¶
type Config struct { SchemaFilename string `yaml:"schema,omitempty"` SchemaStr string `yaml:"-"` Exec PackageConfig `yaml:"exec"` Model PackageConfig `yaml:"model"` Models TypeMap `yaml:"models,omitempty"` // contains filtered or unexported fields }
func LoadConfig ¶
LoadConfig reads the gqlgen.yml config file
func LoadDefaultConfig ¶
LoadDefaultConfig looks for a config file in the current directory, and all parent directories walking up the tree. The closest config file will be returned.
type Field ¶
type Field struct { *Type GQLName string // The name of the field in graphql GoMethodName string // The name of the method in go, if any GoVarName string // The name of the var in go, if any Args []FieldArgument // A list of arguments to be passed to this field ForceResolver bool // Should be emit Resolver method NoErr bool // If this is bound to a go method, does that method have an error as the second argument Object *Object // A link back to the parent object Default interface{} // The default value }
func (*Field) IsConcurrent ¶
func (*Field) IsResolver ¶
func (*Field) ResolverDeclaration ¶
func (*Field) ShortInvocation ¶
func (*Field) ShortResolverDeclaration ¶
type FieldArgument ¶
type Interface ¶
type Interface struct { *NamedType Implementors []InterfaceImplementor }
type InterfaceImplementor ¶
type Model ¶
type Model struct { *NamedType Fields []ModelField }
type ModelBuild ¶
type ModelField ¶
type NamedType ¶
type NamedType struct { Ref IsScalar bool IsInterface bool IsInput bool GQLType string // Name of the graphql type Marshaler *Ref // If this type has an external marshaler this will be set }
func (NamedType) IsMarshaled ¶
type NamedTypes ¶
type Object ¶
type Object struct { *NamedType Fields []Field Satisfies []string Root bool DisableConcurrency bool Stream bool }
func (*Object) HasResolvers ¶
func (*Object) Implementors ¶
type PackageConfig ¶
type PackageConfig struct { Filename string `yaml:"filename,omitempty"` Package string `yaml:"package,omitempty"` }
func (*PackageConfig) Check ¶
func (c *PackageConfig) Check() error
func (*PackageConfig) Dir ¶
func (c *PackageConfig) Dir() string
func (*PackageConfig) ImportPath ¶
func (c *PackageConfig) ImportPath() string
type Ref ¶
type Type ¶
type Type struct { *NamedType Modifiers []string CastType *Ref // the type to cast to when unmarshalling }
func (Type) FullSignature ¶
type TypeMap ¶
type TypeMap map[string]TypeMapEntry
type TypeMapEntry ¶
type TypeMapEntry struct { Model string `yaml:"model"` Fields map[string]TypeMapField `yaml:"fields,omitempty"` }
type TypeMapField ¶
type TypeMapField struct {
Resolver bool `yaml:"resolver"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.