customtype

package
v0.1.0-alpha.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareInterfacesMapEqual

func CompareInterfacesMapEqual(m1, m2 map[string]*CustomInterface) bool

func CustomInterfaceEqual

func CustomInterfaceEqual(ci1, ci2 *CustomInterface) bool

Types

type CustomInterface

type CustomInterface struct {
	TSType       string
	GQLType      string
	Fields       []*field.Field
	NonEntFields []*field.NonEntField

	// if present, means that this interface should be imported in GraphQL instead...
	// interface{} to avoid circular dependencies
	Action interface{}

	// if part of input, we store GraphQLFieldName here and use it later on.
	GraphQLFieldName string

	// children of this interface. could be other interfaces or unions
	Children []CustomType

	Exported bool
	// contains filtered or unexported fields
}

func (*CustomInterface) AddEnum

func (ci *CustomInterface) AddEnum(tsEnum *enum.Enum, gqlEnum *enum.GQLEnum)

func (*CustomInterface) AddEnumImport

func (ci *CustomInterface) AddEnumImport(enumImport string)

func (*CustomInterface) ForeignImport

func (ci *CustomInterface) ForeignImport(typ string) bool

func (*CustomInterface) GetAllCustomTypes

func (ci *CustomInterface) GetAllCustomTypes() []CustomType

func (*CustomInterface) GetAllEnums

func (ci *CustomInterface) GetAllEnums() []*enum.Enum

func (*CustomInterface) GetEnumImports

func (ci *CustomInterface) GetEnumImports() []string

func (*CustomInterface) GetGraphQLEnums

func (ci *CustomInterface) GetGraphQLEnums() []*enum.GQLEnum

func (*CustomInterface) GetGraphQLType

func (ci *CustomInterface) GetGraphQLType() string

func (*CustomInterface) GetTSEnums

func (ci *CustomInterface) GetTSEnums() []*enum.Enum

local enums

func (*CustomInterface) GetTSType

func (ci *CustomInterface) GetTSType() string

func (*CustomInterface) GetTSTypes

func (ci *CustomInterface) GetTSTypes() []string

func (*CustomInterface) IsCustomInterface

func (ci *CustomInterface) IsCustomInterface() bool

func (*CustomInterface) IsCustomUnion

func (ci *CustomInterface) IsCustomUnion() bool

type CustomType

type CustomType interface {
	GetTSType() string
	GetGraphQLType() string
	IsCustomInterface() bool
	IsCustomUnion() bool
	GetTSTypes() []string
	GetAllEnums() []*enum.Enum
	// put self last because you can reference
	// want to render in order so that dependencies are rendered first
	GetAllCustomTypes() []CustomType
}

type CustomUnion

type CustomUnion struct {
	TSType     string
	GQLType    string
	Interfaces []*CustomInterface
}

func (*CustomUnion) GetAllCustomTypes

func (cu *CustomUnion) GetAllCustomTypes() []CustomType

func (*CustomUnion) GetAllEnums

func (ci *CustomUnion) GetAllEnums() []*enum.Enum

func (*CustomUnion) GetGraphQLType

func (cu *CustomUnion) GetGraphQLType() string

func (*CustomUnion) GetTSType

func (cu *CustomUnion) GetTSType() string

func (*CustomUnion) GetTSTypes

func (cu *CustomUnion) GetTSTypes() []string

func (*CustomUnion) GetTypeDeclaration

func (cu *CustomUnion) GetTypeDeclaration() (string, error)

func (*CustomUnion) IsCustomInterface

func (cu *CustomUnion) IsCustomInterface() bool

func (*CustomUnion) IsCustomUnion

func (cu *CustomUnion) IsCustomUnion() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL