Versions in this module Expand all Collapse all v0 v0.14.0 Jun 2, 2021 v0.13.0 Jun 2, 2021 Changes in this version + var InterfaceType = types.NewInterfaceType(nil, nil) + var MapType = types.NewMap(types.Typ[types.String], types.NewInterfaceType(nil, nil).Complete()) + func IsNilable(t types.Type) bool + type Binder struct + References []*TypeReference + SawInvalid bool + func (b *Binder) CopyModifiersFromAst(t *ast.Type, base types.Type) types.Type + func (b *Binder) DefaultUserObject(name string) (types.Type, error) + func (b *Binder) FindObject(pkgName string, typeName string) (types.Object, error) + func (b *Binder) FindType(pkgName string, typeName string) (types.Type, error) + func (b *Binder) FindTypeFromName(name string) (types.Type, error) + func (b *Binder) ObjectPosition(typ types.Object) token.Position + func (b *Binder) PointerTo(ref *TypeReference) *TypeReference + func (b *Binder) PushRef(ret *TypeReference) + func (b *Binder) TypePosition(typ types.Type) token.Position + func (b *Binder) TypeReference(schemaType *ast.Type, bindTarget types.Type) (ret *TypeReference, err error) + type Config struct + AutoBind []string + Directives map[string]DirectiveConfig + Exec PackageConfig + Federated bool + Federation PackageConfig + Model PackageConfig + Models TypeMap + OmitSliceElementPointers bool + Packages *code.Packages + Resolver ResolverConfig + Schema *ast.Schema + SchemaFilename StringList + SkipValidation bool + Sources []*ast.Source + StructTag string + func DefaultConfig() *Config + func LoadConfig(filename string) (*Config, error) + func LoadConfigFromDefaultLocations() (*Config, error) + func LoadDefaultConfig() (*Config, error) + func (c *Config) Init() error + func (c *Config) LoadSchema() error + func (c *Config) NewBinder() *Binder + type DirectiveConfig struct + SkipRuntime bool + type PackageConfig struct + Filename string + Package string + func (c *PackageConfig) Check() error + func (c *PackageConfig) Dir() string + func (c *PackageConfig) ImportPath() string + func (c *PackageConfig) IsDefined() bool + func (c *PackageConfig) Pkg() *types.Package + type ResolverConfig struct + DirName string + Filename string + FilenameTemplate string + Layout ResolverLayout + Package string + Type string + func (r *ResolverConfig) Check() error + func (r *ResolverConfig) Dir() string + func (r *ResolverConfig) ImportPath() string + func (r *ResolverConfig) IsDefined() bool + func (r *ResolverConfig) Pkg() *types.Package + type ResolverLayout string + var LayoutFollowSchema ResolverLayout = "follow-schema" + var LayoutSingleFile ResolverLayout = "single-file" + type StringList []string + func (a *StringList) UnmarshalYAML(unmarshal func(interface{}) error) error + func (a StringList) Has(file string) bool + type TypeMap map[string]TypeMapEntry + func (tm TypeMap) Add(name string, goType string) + func (tm TypeMap) Check() error + func (tm TypeMap) Exists(typeName string) bool + func (tm TypeMap) ReferencedPackages() []string + func (tm TypeMap) UserDefined(typeName string) bool + type TypeMapEntry struct + Fields map[string]TypeMapField + Model StringList + type TypeMapField struct + FieldName string + GeneratedMethod string + Resolver bool + type TypeReference struct + CastType types.Type + Definition *ast.Definition + GO types.Type + GQL *ast.Type + IsMarshaler bool + Marshaler *types.Func + Target types.Type + Unmarshaler *types.Func + func (ref *TypeReference) Elem() *TypeReference + func (t *TypeReference) IsNamed() bool + func (t *TypeReference) IsNilable() bool + func (t *TypeReference) IsPtr() bool + func (t *TypeReference) IsScalar() bool + func (t *TypeReference) IsSlice() bool + func (t *TypeReference) IsStruct() bool + func (t *TypeReference) IsTargetNilable() bool + func (t *TypeReference) MarshalFunc() string + func (t *TypeReference) UniquenessKey() string + func (t *TypeReference) UnmarshalFunc() string