enttype

package
v0.1.0-alpha.18 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertFunc

func ConvertFunc(t EntType) string

func GetGoType

func GetGoType(typ types.Type) string

GetGoType returns the type that should be put in a golang-declaration for the type e.g. in structs, in generated graphql code, etc

func IsContextType

func IsContextType(typ Type) bool

func IsConvertDataType

func IsConvertDataType(t EntType) bool

func IsErrorType

func IsErrorType(typ Type) bool

func IsIDType added in v0.0.30

func IsIDType(t Type) bool

func IsImportDepsType

func IsImportDepsType(t EntType) bool

func IsListType

func IsListType(t Type) bool

TODO need an interface for this

func IsNullType

func IsNullType(typ Type) bool

Types

type ActionFieldsInfo added in v0.0.35

type ActionFieldsInfo struct {
	ActionName     string
	ExcludedFields []string
}

type ArrayListType

type ArrayListType struct {
	ElemType TSType
	// contains filtered or unexported fields
}

actual list type that we use not ArrayType or SliceType

func (*ArrayListType) Convert

func (t *ArrayListType) Convert() *tsimport.ImportPath

func (*ArrayListType) GetCastToMethod

func (t *ArrayListType) GetCastToMethod() string

func (*ArrayListType) GetCustomTypeInfo added in v0.1.0

func (t *ArrayListType) GetCustomTypeInfo() *CustomTypeInfo

func (*ArrayListType) GetDBType

func (t *ArrayListType) GetDBType() string

func (*ArrayListType) GetGraphQLType

func (t *ArrayListType) GetGraphQLType() string

func (*ArrayListType) GetImportDepsType added in v0.1.0

func (t *ArrayListType) GetImportDepsType() *tsimport.ImportPath

func (*ArrayListType) GetNullableType

func (t *ArrayListType) GetNullableType() TSGraphQLType

func (*ArrayListType) GetSubFields added in v0.1.0

func (t *ArrayListType) GetSubFields() interface{}

func (*ArrayListType) GetTSGraphQLImports

func (t *ArrayListType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*ArrayListType) GetTSType

func (t *ArrayListType) GetTSType() string

func (*ArrayListType) GetTsTypeImports

func (t *ArrayListType) GetTsTypeImports() []*tsimport.ImportPath

func (*ArrayListType) GetZeroValue

func (t *ArrayListType) GetZeroValue() string

type ArrayType

type ArrayType struct {
	// contains filtered or unexported fields
}

func (*ArrayType) DefaultGraphQLFieldName

func (t *ArrayType) DefaultGraphQLFieldName() string

func (*ArrayType) GetCastToMethod

func (t *ArrayType) GetCastToMethod() string

func (*ArrayType) GetDBType

func (t *ArrayType) GetDBType() string

json fields are stored as strings in the db

func (*ArrayType) GetElemGraphQLType

func (t *ArrayType) GetElemGraphQLType() string

func (*ArrayType) GetGraphQLType

func (t *ArrayType) GetGraphQLType() string

func (*ArrayType) GetTSGraphQLImports

func (t *ArrayType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*ArrayType) GetTSType

func (t *ArrayType) GetTSType() string

func (*ArrayType) GetZeroValue

func (t *ArrayType) GetZeroValue() string

func (*ArrayType) Uncloneable added in v0.0.38

func (t *ArrayType) Uncloneable() bool

type BigIntImport

type BigIntImport struct {
	// contains filtered or unexported fields
}

func (*BigIntImport) Aliases

func (imp *BigIntImport) Aliases() []string

func (*BigIntImport) DefaultImport

func (b *BigIntImport) DefaultImport() bool

func (*BigIntImport) Import

func (imp *BigIntImport) Import() string

func (*BigIntImport) ImportPath

func (b *BigIntImport) ImportPath() string

type BigIntegerType

type BigIntegerType struct {
	IntegerType
}

func (*BigIntegerType) Convert

func (t *BigIntegerType) Convert() *tsimport.ImportPath

func (*BigIntegerType) GetCastToMethod

func (t *BigIntegerType) GetCastToMethod() string

func (*BigIntegerType) GetDBType

func (t *BigIntegerType) GetDBType() string

func (*BigIntegerType) GetGraphQLType

func (t *BigIntegerType) GetGraphQLType() string

func (*BigIntegerType) GetImportType

func (t *BigIntegerType) GetImportType() Import

func (*BigIntegerType) GetNullableType

func (t *BigIntegerType) GetNullableType() TSGraphQLType

func (*BigIntegerType) GetTSGraphQLImports

func (t *BigIntegerType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*BigIntegerType) GetTSType

func (t *BigIntegerType) GetTSType() string

func (*BigIntegerType) GetZeroValue

func (t *BigIntegerType) GetZeroValue() string

type BoolImport

type BoolImport struct {
	// contains filtered or unexported fields
}

func (*BoolImport) Aliases

func (imp *BoolImport) Aliases() []string

func (*BoolImport) DefaultImport

func (b *BoolImport) DefaultImport() bool

func (*BoolImport) Import

func (imp *BoolImport) Import() string

func (*BoolImport) ImportPath

func (b *BoolImport) ImportPath() string

type BoolType

type BoolType struct {
	// contains filtered or unexported fields
}

func (*BoolType) Convert

func (t *BoolType) Convert() *tsimport.ImportPath

func (*BoolType) GetCastToMethod

func (t *BoolType) GetCastToMethod() string

func (*BoolType) GetDBType

func (t *BoolType) GetDBType() string

func (*BoolType) GetGraphQLType

func (t *BoolType) GetGraphQLType() string

func (*BoolType) GetImportType

func (t *BoolType) GetImportType() Import

func (*BoolType) GetNullableType

func (t *BoolType) GetNullableType() TSGraphQLType

func (*BoolType) GetTSGraphQLImports

func (t *BoolType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*BoolType) GetTSType

func (t *BoolType) GetTSType() string

func (*BoolType) GetZeroValue

func (t *BoolType) GetZeroValue() string

type CommonJSONType added in v0.1.0

type CommonJSONType struct {
	ImportType *tsimport.ImportPath
	// input SubFields. not typed because of circular dependencies
	SubFields              interface{}
	UnionFields            interface{}
	CustomTsInterface      string
	CustomGraphQLInterface string
}

func (*CommonJSONType) GetCastToMethod

func (t *CommonJSONType) GetCastToMethod() string

func (*CommonJSONType) GetCustomGraphQLInterface added in v0.1.0

func (t *CommonJSONType) GetCustomGraphQLInterface() string

func (*CommonJSONType) GetCustomTypeInfo added in v0.1.0

func (t *CommonJSONType) GetCustomTypeInfo() *CustomTypeInfo

func (*CommonJSONType) GetGraphQLType added in v0.1.0

func (t *CommonJSONType) GetGraphQLType() string

func (*CommonJSONType) GetImportDepsType added in v0.1.0

func (t *CommonJSONType) GetImportDepsType() *tsimport.ImportPath

func (*CommonJSONType) GetImportType added in v0.1.0

func (t *CommonJSONType) GetImportType() Import

func (*CommonJSONType) GetSubFields added in v0.1.0

func (t *CommonJSONType) GetSubFields() interface{}

func (*CommonJSONType) GetTsTypeImports added in v0.1.0

func (t *CommonJSONType) GetTsTypeImports() []*tsimport.ImportPath

func (*CommonJSONType) GetUnionFields added in v0.1.0

func (t *CommonJSONType) GetUnionFields() interface{}

func (*CommonJSONType) GetZeroValue

func (t *CommonJSONType) GetZeroValue() string

type CommonObjectType

type CommonObjectType struct {
	TSType         string
	GraphQLType    string
	ActionName     string
	ExcludedFields []string
}

public for tests

func (*CommonObjectType) GetActionFieldsInfo added in v0.0.35

func (t *CommonObjectType) GetActionFieldsInfo() *ActionFieldsInfo

func (*CommonObjectType) GetCastToMethod

func (t *CommonObjectType) GetCastToMethod() string

func (*CommonObjectType) GetCustomTypeInfo added in v0.1.0

func (t *CommonObjectType) GetCustomTypeInfo() *CustomTypeInfo

func (*CommonObjectType) GetDBType

func (t *CommonObjectType) GetDBType() string

func (*CommonObjectType) GetZeroValue

func (t *CommonObjectType) GetZeroValue() string

type Config added in v0.0.35

type Config interface {
	Base64EncodeIDs() bool
}

type ConvertDataType

type ConvertDataType interface {
	TSType
	Convert() *tsimport.ImportPath
}

type CustomGQLRenderer added in v0.0.35

type CustomGQLRenderer interface {
	TSGraphQLType
	CustomGQLRender(cfg Config, v string) string
	ArgImports(cfg Config) []*tsimport.ImportPath
}

rendering of fields in actions e.g. converting a graphql id to ent id or converting say an enum value from graphql to Node representation if said conversion was not supported natively

type CustomType added in v0.1.0

type CustomType string
const (
	CustomInterface CustomType = "custom_interface"
	CustomUnion     CustomType = "custom_union"
)

type CustomTypeInfo added in v0.1.0

type CustomTypeInfo struct {
	TSInterface      string
	GraphQLInterface string
	Type             CustomType
}

type DateImport

type DateImport struct {
	// contains filtered or unexported fields
}

func (*DateImport) Aliases

func (imp *DateImport) Aliases() []string

func (*DateImport) DefaultImport

func (b *DateImport) DefaultImport() bool

func (*DateImport) Import

func (imp *DateImport) Import() string

func (*DateImport) ImportPath

func (b *DateImport) ImportPath() string

type DateType

type DateType struct {
	TimestampType
}

func (*DateType) Convert

func (t *DateType) Convert() *tsimport.ImportPath

func (*DateType) GetDBType

func (t *DateType) GetDBType() string

func (*DateType) GetImportType

func (t *DateType) GetImportType() Import

func (*DateType) GetNullableType

func (t *DateType) GetNullableType() TSGraphQLType

type DefaulFieldNameType

type DefaulFieldNameType interface {
	DefaultGraphQLFieldName() string
}

type EmailImport

type EmailImport struct {
	// contains filtered or unexported fields
}

func (*EmailImport) Aliases

func (imp *EmailImport) Aliases() []string

func (*EmailImport) DefaultImport

func (b *EmailImport) DefaultImport() bool

func (*EmailImport) Import

func (imp *EmailImport) Import() string

func (*EmailImport) ImportPath

func (imp *EmailImport) ImportPath() string

type EmailType

type EmailType struct {
	StringType
}

func (*EmailType) GetDBType

func (t *EmailType) GetDBType() string

func (*EmailType) GetImportType

func (t *EmailType) GetImportType() Import

func (*EmailType) GetNullableType

func (t *EmailType) GetNullableType() TSGraphQLType

func (*EmailType) GetZeroValue

func (t *EmailType) GetZeroValue() string

hmm we don't use these for the nullable types right now. unclear if right thing...

type EntType

type EntType interface {
	Type
	GetDBType() string
	GetCastToMethod() string // returns the method in cast.go (cast.To***) which casts from interface{} to strongly typed
	GetZeroValue() string
}

EntType interface is for fields exposed to Ents (stored in the DB) etc

type EnumData added in v0.1.0

type EnumData struct {
	Values               []string
	EnumMap              map[string]string
	IntEnumMap           map[string]int
	DeprecatedIntEnumMap map[string]int
}

type EnumeratedType

type EnumeratedType interface {
	TSType
	// GetTSName refers to the name of the generated enum
	GetTSName() string
	GetGraphQLName() string

	GetEnumData() *EnumData
}

EnumeratedType indicates that this is an enum type

func GetEnumType

func GetEnumType(t Type) (EnumeratedType, bool)

this exists because we need to account for lists...

type FloatImport

type FloatImport struct {
	// contains filtered or unexported fields
}

func (*FloatImport) Aliases

func (imp *FloatImport) Aliases() []string

func (*FloatImport) DefaultImport

func (b *FloatImport) DefaultImport() bool

func (*FloatImport) Import

func (imp *FloatImport) Import() string

func (*FloatImport) ImportPath

func (b *FloatImport) ImportPath() string

type FloatType

type FloatType struct {
	// contains filtered or unexported fields
}

func (*FloatType) GetCastToMethod

func (t *FloatType) GetCastToMethod() string

func (*FloatType) GetDBType

func (t *FloatType) GetDBType() string

func (*FloatType) GetGraphQLType

func (t *FloatType) GetGraphQLType() string

func (*FloatType) GetImportType

func (t *FloatType) GetImportType() Import

func (*FloatType) GetNullableType

func (t *FloatType) GetNullableType() TSGraphQLType

func (*FloatType) GetTSGraphQLImports

func (t *FloatType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*FloatType) GetTSType

func (t *FloatType) GetTSType() string

func (*FloatType) GetZeroValue

func (t *FloatType) GetZeroValue() string

type IDType

type IDType struct {
	// contains filtered or unexported fields
}

func (*IDType) ArgImports added in v0.0.35

func (t *IDType) ArgImports(cfg Config) []*tsimport.ImportPath

func (*IDType) CustomGQLRender added in v0.0.35

func (t *IDType) CustomGQLRender(cfg Config, v string) string

func (*IDType) GetCastToMethod

func (t *IDType) GetCastToMethod() string

func (*IDType) GetDBType

func (t *IDType) GetDBType() string

func (*IDType) GetGraphQLType

func (t *IDType) GetGraphQLType() string

func (*IDType) GetImportType

func (t *IDType) GetImportType() Import

func (*IDType) GetNullableType

func (t *IDType) GetNullableType() TSGraphQLType

func (*IDType) GetTSGraphQLImports

func (t *IDType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*IDType) GetTSType

func (t *IDType) GetTSType() string

func (*IDType) GetTsTypeImports

func (t *IDType) GetTsTypeImports() []*tsimport.ImportPath

func (*IDType) GetZeroValue

func (t *IDType) GetZeroValue() string

func (*IDType) IsIDType

func (t *IDType) IsIDType() bool

type Import

type Import interface {
	ImportPath() string
	Import() string
	DefaultImport() bool
	Aliases() []string
}

func GetTypeForField

func GetTypeForField(s string) Import

func ValidateTypeForImport

func ValidateTypeForImport(s string) (Import, error)

type ImportDepsType

type ImportDepsType interface {
	TSGraphQLType
	GetImportDepsType() *tsimport.ImportPath
}

type IntImport

type IntImport struct {
	// contains filtered or unexported fields
}

func (*IntImport) Aliases

func (imp *IntImport) Aliases() []string

func (*IntImport) DefaultImport

func (b *IntImport) DefaultImport() bool

func (*IntImport) Import

func (imp *IntImport) Import() string

func (*IntImport) ImportPath

func (b *IntImport) ImportPath() string

type IntegerEnumType added in v0.1.0

type IntegerEnumType struct {
	Type              string
	GraphQLType       string
	EnumMap           map[string]int
	DeprecatedEnumMap map[string]int
}

func (*IntegerEnumType) GetCastToMethod

func (t *IntegerEnumType) GetCastToMethod() string

func (*IntegerEnumType) GetDBType added in v0.1.0

func (t *IntegerEnumType) GetDBType() string

func (*IntegerEnumType) GetEnumData added in v0.1.0

func (t *IntegerEnumType) GetEnumData() *EnumData

func (*IntegerEnumType) GetGraphQLName

func (t *IntegerEnumType) GetGraphQLName() string

func (*IntegerEnumType) GetGraphQLType added in v0.1.0

func (t *IntegerEnumType) GetGraphQLType() string

func (*IntegerEnumType) GetNullableType added in v0.1.0

func (t *IntegerEnumType) GetNullableType() TSGraphQLType

func (*IntegerEnumType) GetTSGraphQLImports added in v0.1.0

func (t *IntegerEnumType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*IntegerEnumType) GetTSName

func (t *IntegerEnumType) GetTSName() string

func (*IntegerEnumType) GetTSType added in v0.1.0

func (t *IntegerEnumType) GetTSType() string

func (*IntegerEnumType) GetTsTypeImports added in v0.1.0

func (t *IntegerEnumType) GetTsTypeImports() []*tsimport.ImportPath

func (*IntegerEnumType) GetZeroValue

func (t *IntegerEnumType) GetZeroValue() string

type IntegerType

type IntegerType struct {
	// contains filtered or unexported fields
}

func (*IntegerType) GetCastToMethod

func (t *IntegerType) GetCastToMethod() string

func (*IntegerType) GetDBType

func (t *IntegerType) GetDBType() string

func (*IntegerType) GetGraphQLType

func (t *IntegerType) GetGraphQLType() string

func (*IntegerType) GetImportType

func (t *IntegerType) GetImportType() Import

func (*IntegerType) GetNullableType

func (t *IntegerType) GetNullableType() TSGraphQLType

func (*IntegerType) GetTSGraphQLImports

func (t *IntegerType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*IntegerType) GetTSType

func (t *IntegerType) GetTSType() string

func (*IntegerType) GetZeroValue

func (t *IntegerType) GetZeroValue() string

type JSONBImport

type JSONBImport struct {
	// contains filtered or unexported fields
}

func (*JSONBImport) Aliases

func (imp *JSONBImport) Aliases() []string

func (*JSONBImport) DefaultImport

func (b *JSONBImport) DefaultImport() bool

func (*JSONBImport) Import

func (imp *JSONBImport) Import() string

func (*JSONBImport) ImportPath

func (imp *JSONBImport) ImportPath() string

type JSONBType

type JSONBType struct {
	CommonJSONType
}

func (*JSONBType) Convert

func (t *JSONBType) Convert() *tsimport.ImportPath

func (*JSONBType) GetDBType

func (t *JSONBType) GetDBType() string

func (*JSONBType) GetImportDepsType

func (t *JSONBType) GetImportDepsType() *tsimport.ImportPath

func (*JSONBType) GetImportType

func (t *JSONBType) GetImportType() Import

func (*JSONBType) GetNullableType

func (t *JSONBType) GetNullableType() TSGraphQLType

func (*JSONBType) GetTSGraphQLImports

func (t *JSONBType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*JSONBType) GetTSType

func (t *JSONBType) GetTSType() string

type JSONImport

type JSONImport struct {
	// contains filtered or unexported fields
}

func (*JSONImport) Aliases

func (imp *JSONImport) Aliases() []string

func (*JSONImport) DefaultImport

func (b *JSONImport) DefaultImport() bool

func (*JSONImport) Import

func (imp *JSONImport) Import() string

func (*JSONImport) ImportPath

func (imp *JSONImport) ImportPath() string

type JSONType

type JSONType struct {
	CommonJSONType
}

func (*JSONType) Convert

func (t *JSONType) Convert() *tsimport.ImportPath

func (*JSONType) GetDBType

func (t *JSONType) GetDBType() string

func (*JSONType) GetImportDepsType

func (t *JSONType) GetImportDepsType() *tsimport.ImportPath

func (*JSONType) GetNullableType

func (t *JSONType) GetNullableType() TSGraphQLType

func (*JSONType) GetTSGraphQLImports

func (t *JSONType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*JSONType) GetTSType

func (t *JSONType) GetTSType() string

type ListType

type ListType interface {
	Type
	GetElemGraphQLType() string
}

type ListWrapperType

type ListWrapperType struct {
	Type TSGraphQLType
	// doesn't care if content is nullable. that's handled by Type passed...
	Nullable bool
}

func (*ListWrapperType) GetActionFieldsInfo added in v0.0.35

func (t *ListWrapperType) GetActionFieldsInfo() *ActionFieldsInfo

func (*ListWrapperType) GetCastToMethod

func (t *ListWrapperType) GetCastToMethod() string

func (*ListWrapperType) GetCustomTypeInfo added in v0.1.0

func (t *ListWrapperType) GetCustomTypeInfo() *CustomTypeInfo

func (*ListWrapperType) GetDBType

func (t *ListWrapperType) GetDBType() string

func (*ListWrapperType) GetGraphQLType

func (t *ListWrapperType) GetGraphQLType() string

func (*ListWrapperType) GetImportDepsType added in v0.1.0

func (t *ListWrapperType) GetImportDepsType() *tsimport.ImportPath

func (*ListWrapperType) GetNonNullableType

func (t *ListWrapperType) GetNonNullableType() TSGraphQLType

func (*ListWrapperType) GetNullableType

func (t *ListWrapperType) GetNullableType() TSGraphQLType

func (*ListWrapperType) GetTSGraphQLImports

func (t *ListWrapperType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*ListWrapperType) GetTSType

func (t *ListWrapperType) GetTSType() string

func (*ListWrapperType) GetZeroValue

func (t *ListWrapperType) GetZeroValue() string

type MapType

type MapType struct {
	// contains filtered or unexported fields
}

func (*MapType) GetCastToMethod

func (t *MapType) GetCastToMethod() string

func (*MapType) GetDBType

func (t *MapType) GetDBType() string

json fields are stored as strings in the db

func (*MapType) GetGraphQLType

func (t *MapType) GetGraphQLType() string

func (*MapType) GetTSGraphQLImports

func (t *MapType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*MapType) GetTSType

func (t *MapType) GetTSType() string

func (*MapType) GetZeroValue

func (t *MapType) GetZeroValue() string

func (*MapType) Uncloneable added in v0.0.38

func (t *MapType) Uncloneable() bool

type NamedType

type NamedType struct {
	// contains filtered or unexported fields
}

func NewNamedType

func NewNamedType(typ types.Type, forceNullable, forceNonNullable bool) *NamedType

func (*NamedType) DefaultGraphQLFieldName

func (t *NamedType) DefaultGraphQLFieldName() string

func (*NamedType) GetCastToMethod

func (t *NamedType) GetCastToMethod() string

func (*NamedType) GetDBType

func (t *NamedType) GetDBType() string

json fields are stored as strings in the db

func (*NamedType) GetGraphQLType

func (t *NamedType) GetGraphQLType() string

func (*NamedType) GetNonNullableType

func (t *NamedType) GetNonNullableType() Type

func (*NamedType) GetNullableType

func (t *NamedType) GetNullableType() Type

func (*NamedType) GetTSGraphQLImports

func (t *NamedType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NamedType) GetTSType

func (t *NamedType) GetTSType() string

func (*NamedType) GetZeroValue

func (t *NamedType) GetZeroValue() string

func (*NamedType) Uncloneable added in v0.0.38

func (t *NamedType) Uncloneable() bool

type NonNullableType

type NonNullableType interface {
	TSGraphQLType
	GetNonNullableType() TSGraphQLType
}

type NullableArrayListType

type NullableArrayListType struct {
	ElemType TSType
	// contains filtered or unexported fields
}

func (*NullableArrayListType) Convert

TODO why is there ListWrapperType (for ActionFields) and NullableArrayListType /ArrayListType for regular lists? TODO GetCustomTypeInfo

func (*NullableArrayListType) GetCastToMethod

func (t *NullableArrayListType) GetCastToMethod() string

func (*NullableArrayListType) GetCustomTypeInfo added in v0.1.0

func (t *NullableArrayListType) GetCustomTypeInfo() *CustomTypeInfo

func (*NullableArrayListType) GetDBType

func (t *NullableArrayListType) GetDBType() string

func (*NullableArrayListType) GetGraphQLType

func (t *NullableArrayListType) GetGraphQLType() string

func (*NullableArrayListType) GetImportDepsType added in v0.1.0

func (t *NullableArrayListType) GetImportDepsType() *tsimport.ImportPath

func (*NullableArrayListType) GetNonNullableType

func (t *NullableArrayListType) GetNonNullableType() TSGraphQLType

func (*NullableArrayListType) GetSubFields added in v0.1.0

func (t *NullableArrayListType) GetSubFields() interface{}

func (*NullableArrayListType) GetTSGraphQLImports

func (t *NullableArrayListType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableArrayListType) GetTSType

func (t *NullableArrayListType) GetTSType() string

func (*NullableArrayListType) GetTsTypeImports

func (t *NullableArrayListType) GetTsTypeImports() []*tsimport.ImportPath

func (*NullableArrayListType) GetZeroValue

func (t *NullableArrayListType) GetZeroValue() string

type NullableBigIntegerType

type NullableBigIntegerType struct {
	NullableIntegerType
}

what's the best graphql representation? for now we'll use strings but there's a few graphql representations on the Internet

func (*NullableBigIntegerType) Convert

func (*NullableBigIntegerType) GetCastToMethod

func (t *NullableBigIntegerType) GetCastToMethod() string

func (*NullableBigIntegerType) GetDBType

func (t *NullableBigIntegerType) GetDBType() string

func (*NullableBigIntegerType) GetGraphQLType

func (t *NullableBigIntegerType) GetGraphQLType() string

func (*NullableBigIntegerType) GetImportType

func (t *NullableBigIntegerType) GetImportType() Import

func (*NullableBigIntegerType) GetNonNullableType

func (t *NullableBigIntegerType) GetNonNullableType() TSGraphQLType

func (*NullableBigIntegerType) GetTSGraphQLImports

func (t *NullableBigIntegerType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableBigIntegerType) GetTSType

func (t *NullableBigIntegerType) GetTSType() string

func (*NullableBigIntegerType) GetZeroValue

func (t *NullableBigIntegerType) GetZeroValue() string

type NullableBoolType

type NullableBoolType struct {
	// contains filtered or unexported fields
}

func (*NullableBoolType) Convert

func (t *NullableBoolType) Convert() *tsimport.ImportPath

func (*NullableBoolType) GetCastToMethod

func (t *NullableBoolType) GetCastToMethod() string

func (*NullableBoolType) GetDBType

func (t *NullableBoolType) GetDBType() string

func (*NullableBoolType) GetGraphQLType

func (t *NullableBoolType) GetGraphQLType() string

func (*NullableBoolType) GetImportType

func (t *NullableBoolType) GetImportType() Import

func (*NullableBoolType) GetNonNullableType

func (t *NullableBoolType) GetNonNullableType() TSGraphQLType

func (*NullableBoolType) GetTSGraphQLImports

func (t *NullableBoolType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableBoolType) GetTSType

func (t *NullableBoolType) GetTSType() string

func (*NullableBoolType) GetZeroValue

func (t *NullableBoolType) GetZeroValue() string

type NullableDateType

type NullableDateType struct {
	NullableTimestampType
}

func (*NullableDateType) DefaultGraphQLFieldName

func (t *NullableDateType) DefaultGraphQLFieldName() string

func (*NullableDateType) GetDBType

func (t *NullableDateType) GetDBType() string

func (*NullableDateType) GetImportType

func (t *NullableDateType) GetImportType() Import

func (*NullableDateType) GetNonNullableType

func (t *NullableDateType) GetNonNullableType() TSGraphQLType

func (*NullableDateType) GetZeroValue

func (t *NullableDateType) GetZeroValue() string

type NullableEmailType

type NullableEmailType struct {
	NullableStringType
}

func (*NullableEmailType) GetDBType

func (t *NullableEmailType) GetDBType() string

func (*NullableEmailType) GetImportType

func (t *NullableEmailType) GetImportType() Import

func (*NullableEmailType) GetNonNullableType

func (t *NullableEmailType) GetNonNullableType() TSGraphQLType

func (*NullableEmailType) GetZeroValue

func (t *NullableEmailType) GetZeroValue() string

hmm we don't use these for the nullable types right now. unclear if right thing...

type NullableFloatType

type NullableFloatType struct {
	// contains filtered or unexported fields
}

func (*NullableFloatType) GetCastToMethod

func (t *NullableFloatType) GetCastToMethod() string

func (*NullableFloatType) GetDBType

func (t *NullableFloatType) GetDBType() string

func (*NullableFloatType) GetGraphQLType

func (t *NullableFloatType) GetGraphQLType() string

func (*NullableFloatType) GetImportType

func (t *NullableFloatType) GetImportType() Import

func (*NullableFloatType) GetNonNullableType

func (t *NullableFloatType) GetNonNullableType() TSGraphQLType

func (*NullableFloatType) GetTSGraphQLImports

func (t *NullableFloatType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableFloatType) GetTSType

func (t *NullableFloatType) GetTSType() string

func (*NullableFloatType) GetZeroValue

func (t *NullableFloatType) GetZeroValue() string

type NullableIDType

type NullableIDType struct {
	// contains filtered or unexported fields
}

func (*NullableIDType) ArgImports added in v0.0.35

func (t *NullableIDType) ArgImports(cfg Config) []*tsimport.ImportPath

func (*NullableIDType) CustomGQLRender added in v0.0.35

func (t *NullableIDType) CustomGQLRender(cfg Config, v string) string

func (*NullableIDType) GetCastToMethod

func (t *NullableIDType) GetCastToMethod() string

func (*NullableIDType) GetDBType

func (t *NullableIDType) GetDBType() string

func (*NullableIDType) GetGraphQLType

func (t *NullableIDType) GetGraphQLType() string

func (*NullableIDType) GetImportType

func (t *NullableIDType) GetImportType() Import

func (*NullableIDType) GetNonNullableType

func (t *NullableIDType) GetNonNullableType() TSGraphQLType

func (*NullableIDType) GetTSGraphQLImports

func (t *NullableIDType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableIDType) GetTSType

func (t *NullableIDType) GetTSType() string

func (*NullableIDType) GetTsTypeImports

func (t *NullableIDType) GetTsTypeImports() []*tsimport.ImportPath

func (*NullableIDType) GetZeroValue

func (t *NullableIDType) GetZeroValue() string

func (*NullableIDType) IsIDType

func (t *NullableIDType) IsIDType() bool

type NullableIntegerEnumType added in v0.1.0

type NullableIntegerEnumType struct {
	Type              string
	GraphQLType       string
	EnumMap           map[string]int
	DeprecatedEnumMap map[string]int
}

func (*NullableIntegerEnumType) GetCastToMethod

func (t *NullableIntegerEnumType) GetCastToMethod() string

func (*NullableIntegerEnumType) GetDBType added in v0.1.0

func (t *NullableIntegerEnumType) GetDBType() string

func (*NullableIntegerEnumType) GetEnumData added in v0.1.0

func (t *NullableIntegerEnumType) GetEnumData() *EnumData

func (*NullableIntegerEnumType) GetGraphQLName

func (t *NullableIntegerEnumType) GetGraphQLName() string

func (*NullableIntegerEnumType) GetGraphQLType added in v0.1.0

func (t *NullableIntegerEnumType) GetGraphQLType() string

func (*NullableIntegerEnumType) GetNonNullableType added in v0.1.0

func (t *NullableIntegerEnumType) GetNonNullableType() TSGraphQLType

func (*NullableIntegerEnumType) GetTSGraphQLImports added in v0.1.0

func (t *NullableIntegerEnumType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableIntegerEnumType) GetTSName

func (t *NullableIntegerEnumType) GetTSName() string

func (*NullableIntegerEnumType) GetTSType added in v0.1.0

func (t *NullableIntegerEnumType) GetTSType() string

func (*NullableIntegerEnumType) GetTsTypeImports added in v0.1.0

func (t *NullableIntegerEnumType) GetTsTypeImports() []*tsimport.ImportPath

func (*NullableIntegerEnumType) GetZeroValue

func (t *NullableIntegerEnumType) GetZeroValue() string

type NullableIntegerType

type NullableIntegerType struct {
	// contains filtered or unexported fields
}

func (*NullableIntegerType) GetCastToMethod

func (t *NullableIntegerType) GetCastToMethod() string

func (*NullableIntegerType) GetDBType

func (t *NullableIntegerType) GetDBType() string

func (*NullableIntegerType) GetGraphQLType

func (t *NullableIntegerType) GetGraphQLType() string

func (*NullableIntegerType) GetImportType

func (t *NullableIntegerType) GetImportType() Import

func (*NullableIntegerType) GetNonNullableType

func (t *NullableIntegerType) GetNonNullableType() TSGraphQLType

func (*NullableIntegerType) GetTSGraphQLImports

func (t *NullableIntegerType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableIntegerType) GetTSType

func (t *NullableIntegerType) GetTSType() string

func (*NullableIntegerType) GetZeroValue

func (t *NullableIntegerType) GetZeroValue() string

type NullableJSONBType

type NullableJSONBType struct {
	CommonJSONType
}

func (*NullableJSONBType) Convert

func (t *NullableJSONBType) Convert() *tsimport.ImportPath

func (*NullableJSONBType) GetDBType

func (t *NullableJSONBType) GetDBType() string

func (*NullableJSONBType) GetGraphQLType

func (t *NullableJSONBType) GetGraphQLType() string

func (*NullableJSONBType) GetImportType

func (t *NullableJSONBType) GetImportType() Import

func (*NullableJSONBType) GetNonNullableType

func (t *NullableJSONBType) GetNonNullableType() TSGraphQLType

func (*NullableJSONBType) GetTSGraphQLImports

func (t *NullableJSONBType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableJSONBType) GetTSType

func (t *NullableJSONBType) GetTSType() string

type NullableJSONType

type NullableJSONType struct {
	CommonJSONType
}

func (*NullableJSONType) Convert

func (t *NullableJSONType) Convert() *tsimport.ImportPath

func (*NullableJSONType) GetDBType

func (t *NullableJSONType) GetDBType() string

func (*NullableJSONType) GetGraphQLType

func (t *NullableJSONType) GetGraphQLType() string

func (*NullableJSONType) GetImportDepsType

func (t *NullableJSONType) GetImportDepsType() *tsimport.ImportPath

func (*NullableJSONType) GetNonNullableType

func (t *NullableJSONType) GetNonNullableType() TSGraphQLType

func (*NullableJSONType) GetTSGraphQLImports

func (t *NullableJSONType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableJSONType) GetTSType

func (t *NullableJSONType) GetTSType() string

type NullableObjectType

type NullableObjectType struct {
	CommonObjectType
}

func (*NullableObjectType) GetGraphQLType

func (t *NullableObjectType) GetGraphQLType() string

func (*NullableObjectType) GetNullableType

func (t *NullableObjectType) GetNullableType() TSGraphQLType

func (*NullableObjectType) GetTSGraphQLImports

func (t *NullableObjectType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableObjectType) GetTSType

func (t *NullableObjectType) GetTSType() string

type NullablePasswordType

type NullablePasswordType struct {
	NullableStringType
}

func (*NullablePasswordType) GetDBType

func (t *NullablePasswordType) GetDBType() string

func (*NullablePasswordType) GetImportType

func (t *NullablePasswordType) GetImportType() Import

func (*NullablePasswordType) GetNonNullableType

func (t *NullablePasswordType) GetNonNullableType() TSGraphQLType

func (*NullablePasswordType) GetZeroValue

func (t *NullablePasswordType) GetZeroValue() string

hmm we don't use these for the nullable types right now. unclear if right thing...

type NullablePhoneType

type NullablePhoneType struct {
	NullableStringType
}

func (*NullablePhoneType) GetDBType

func (t *NullablePhoneType) GetDBType() string

func (*NullablePhoneType) GetImportType

func (t *NullablePhoneType) GetImportType() Import

func (*NullablePhoneType) GetNonNullableType

func (t *NullablePhoneType) GetNonNullableType() TSGraphQLType

func (*NullablePhoneType) GetZeroValue

func (t *NullablePhoneType) GetZeroValue() string

hmm we don't use these for the nullable types right now. unclear if right thing...

type NullableStringEnumType added in v0.1.0

type NullableStringEnumType struct {
	EnumDBType  bool
	Type        string
	GraphQLType string
	Values      []string
	EnumMap     map[string]string
	// contains filtered or unexported fields
}

func (*NullableStringEnumType) GetCastToMethod

func (t *NullableStringEnumType) GetCastToMethod() string

func (*NullableStringEnumType) GetDBType added in v0.1.0

func (t *NullableStringEnumType) GetDBType() string

func (*NullableStringEnumType) GetEnumData added in v0.1.0

func (t *NullableStringEnumType) GetEnumData() *EnumData

func (*NullableStringEnumType) GetGraphQLName

func (t *NullableStringEnumType) GetGraphQLName() string

func (*NullableStringEnumType) GetGraphQLType added in v0.1.0

func (t *NullableStringEnumType) GetGraphQLType() string

func (*NullableStringEnumType) GetNonNullableType added in v0.1.0

func (t *NullableStringEnumType) GetNonNullableType() TSGraphQLType

func (*NullableStringEnumType) GetTSGraphQLImports added in v0.1.0

func (t *NullableStringEnumType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableStringEnumType) GetTSName

func (t *NullableStringEnumType) GetTSName() string

func (*NullableStringEnumType) GetTSType added in v0.1.0

func (t *NullableStringEnumType) GetTSType() string

func (*NullableStringEnumType) GetTsTypeImports added in v0.1.0

func (t *NullableStringEnumType) GetTsTypeImports() []*tsimport.ImportPath

func (*NullableStringEnumType) GetZeroValue

func (t *NullableStringEnumType) GetZeroValue() string

type NullableStringType

type NullableStringType struct {
	// contains filtered or unexported fields
}

func (*NullableStringType) GetCastToMethod

func (t *NullableStringType) GetCastToMethod() string

func (*NullableStringType) GetDBType

func (t *NullableStringType) GetDBType() string

func (*NullableStringType) GetGraphQLType

func (t *NullableStringType) GetGraphQLType() string

func (*NullableStringType) GetImportType

func (t *NullableStringType) GetImportType() Import

func (*NullableStringType) GetNonNullableType

func (t *NullableStringType) GetNonNullableType() TSGraphQLType

func (*NullableStringType) GetTSGraphQLImports

func (t *NullableStringType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableStringType) GetTSType

func (t *NullableStringType) GetTSType() string

func (*NullableStringType) GetZeroValue

func (t *NullableStringType) GetZeroValue() string

hmm we don't use these for the nullable types right now. unclear if right thing...

type NullableTimeType

type NullableTimeType struct {
	// contains filtered or unexported fields
}

func (*NullableTimeType) DefaultGraphQLFieldName

func (t *NullableTimeType) DefaultGraphQLFieldName() string

func (*NullableTimeType) GetCastToMethod

func (t *NullableTimeType) GetCastToMethod() string

func (*NullableTimeType) GetDBType

func (t *NullableTimeType) GetDBType() string

func (*NullableTimeType) GetGraphQLType

func (t *NullableTimeType) GetGraphQLType() string

func (*NullableTimeType) GetImportType

func (t *NullableTimeType) GetImportType() Import

func (*NullableTimeType) GetNonNullableType

func (t *NullableTimeType) GetNonNullableType() TSGraphQLType

func (*NullableTimeType) GetTSGraphQLImports

func (t *NullableTimeType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableTimeType) GetTSType

func (t *NullableTimeType) GetTSType() string

func (*NullableTimeType) GetZeroValue

func (t *NullableTimeType) GetZeroValue() string

type NullableTimestampType

type NullableTimestampType struct {
	// contains filtered or unexported fields
}

func (*NullableTimestampType) Convert

func (*NullableTimestampType) DefaultGraphQLFieldName

func (t *NullableTimestampType) DefaultGraphQLFieldName() string

func (*NullableTimestampType) GetCastToMethod

func (t *NullableTimestampType) GetCastToMethod() string

func (*NullableTimestampType) GetDBType

func (t *NullableTimestampType) GetDBType() string

func (*NullableTimestampType) GetGraphQLType

func (t *NullableTimestampType) GetGraphQLType() string

func (*NullableTimestampType) GetImportType

func (t *NullableTimestampType) GetImportType() Import

func (*NullableTimestampType) GetNonNullableType

func (t *NullableTimestampType) GetNonNullableType() TSGraphQLType

func (*NullableTimestampType) GetTSGraphQLImports

func (t *NullableTimestampType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*NullableTimestampType) GetTSType

func (t *NullableTimestampType) GetTSType() string

func (*NullableTimestampType) GetZeroValue

func (t *NullableTimestampType) GetZeroValue() string

type NullableTimestamptzType

type NullableTimestamptzType struct {
	NullableTimestampType
}

func (*NullableTimestamptzType) DefaultGraphQLFieldName

func (t *NullableTimestamptzType) DefaultGraphQLFieldName() string

func (*NullableTimestamptzType) GetDBType

func (t *NullableTimestamptzType) GetDBType() string

func (*NullableTimestamptzType) GetImportType

func (t *NullableTimestamptzType) GetImportType() Import

func (*NullableTimestamptzType) GetNonNullableType

func (t *NullableTimestamptzType) GetNonNullableType() TSGraphQLType

func (*NullableTimestamptzType) GetZeroValue

func (t *NullableTimestamptzType) GetZeroValue() string

type NullableTimetzType

type NullableTimetzType struct {
	NullableTimeType
}

func (*NullableTimetzType) DefaultGraphQLFieldName

func (t *NullableTimetzType) DefaultGraphQLFieldName() string

func (*NullableTimetzType) GetDBType

func (t *NullableTimetzType) GetDBType() string

func (*NullableTimetzType) GetImportType

func (t *NullableTimetzType) GetImportType() Import

func (*NullableTimetzType) GetNonNullableType

func (t *NullableTimetzType) GetNonNullableType() TSGraphQLType

func (*NullableTimetzType) GetZeroValue

func (t *NullableTimetzType) GetZeroValue() string

type NullableType

type NullableType interface {
	TSGraphQLType
	GetNullableType() TSGraphQLType
}

NullableType refers to a Type that has the nullable version of the same type

type ObjectType

type ObjectType struct {
	CommonObjectType
}

func (*ObjectType) GetGraphQLType

func (t *ObjectType) GetGraphQLType() string

func (*ObjectType) GetNullableType

func (t *ObjectType) GetNullableType() TSGraphQLType

func (*ObjectType) GetTSGraphQLImports

func (t *ObjectType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*ObjectType) GetTSType

func (t *ObjectType) GetTSType() string

type PasswordImport

type PasswordImport struct {
	// contains filtered or unexported fields
}

func (*PasswordImport) Aliases

func (imp *PasswordImport) Aliases() []string

func (*PasswordImport) DefaultImport

func (b *PasswordImport) DefaultImport() bool

func (*PasswordImport) Import

func (imp *PasswordImport) Import() string

func (*PasswordImport) ImportPath

func (imp *PasswordImport) ImportPath() string

type PasswordType

type PasswordType struct {
	StringType
}

func (*PasswordType) GetDBType

func (t *PasswordType) GetDBType() string

func (*PasswordType) GetImportType

func (t *PasswordType) GetImportType() Import

func (*PasswordType) GetNullableType

func (t *PasswordType) GetNullableType() TSGraphQLType

func (*PasswordType) GetZeroValue

func (t *PasswordType) GetZeroValue() string

hmm we don't use these for the nullable types right now. unclear if right thing...

type PhoneImport

type PhoneImport struct {
	// contains filtered or unexported fields
}

func (*PhoneImport) Aliases

func (imp *PhoneImport) Aliases() []string

func (*PhoneImport) DefaultImport

func (b *PhoneImport) DefaultImport() bool

func (*PhoneImport) Import

func (imp *PhoneImport) Import() string

func (*PhoneImport) ImportPath

func (imp *PhoneImport) ImportPath() string

type PhoneType

type PhoneType struct {
	StringType
}

func (*PhoneType) GetDBType

func (t *PhoneType) GetDBType() string

func (*PhoneType) GetImportType

func (t *PhoneType) GetImportType() Import

func (*PhoneType) GetNullableType

func (t *PhoneType) GetNullableType() TSGraphQLType

func (*PhoneType) GetZeroValue

func (t *PhoneType) GetZeroValue() string

hmm we don't use these for the nullable types right now. unclear if right thing...

type PointerType

type PointerType struct {
	// contains filtered or unexported fields
}

func NewPointerType

func NewPointerType(typ types.Type, forceNullable, forceNonNullable bool) *PointerType

func (*PointerType) DefaultGraphQLFieldName

func (t *PointerType) DefaultGraphQLFieldName() string

func (*PointerType) GetCastToMethod

func (t *PointerType) GetCastToMethod() string

func (*PointerType) GetDBType

func (t *PointerType) GetDBType() string

json fields are stored as strings in the db

func (*PointerType) GetGraphQLType

func (t *PointerType) GetGraphQLType() string

func (*PointerType) GetNonNullableType

func (t *PointerType) GetNonNullableType() TSGraphQLType

func (*PointerType) GetNullableType

func (t *PointerType) GetNullableType() Type

func (*PointerType) GetTSGraphQLImports

func (t *PointerType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*PointerType) GetTSType

func (t *PointerType) GetTSType() string

func (*PointerType) GetZeroValue

func (t *PointerType) GetZeroValue() string

func (*PointerType) Uncloneable added in v0.0.38

func (t *PointerType) Uncloneable() bool

type RawJSONType

type RawJSONType struct {
	// contains filtered or unexported fields
}

func (*RawJSONType) GetCastToMethod

func (t *RawJSONType) GetCastToMethod() string

func (*RawJSONType) GetDBType

func (t *RawJSONType) GetDBType() string

json fields are stored as strings in the db

func (*RawJSONType) GetGraphQLType

func (t *RawJSONType) GetGraphQLType() string

func (*RawJSONType) GetTSGraphQLImports

func (t *RawJSONType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*RawJSONType) GetTSType

func (t *RawJSONType) GetTSType() string

func (*RawJSONType) GetZeroValue

func (t *RawJSONType) GetZeroValue() string

func (*RawJSONType) Uncloneable added in v0.0.38

func (t *RawJSONType) Uncloneable() bool

type SliceType

type SliceType struct {
	// contains filtered or unexported fields
}

func NewSliceType

func NewSliceType(typ *types.Slice) *SliceType

func (*SliceType) DefaultGraphQLFieldName

func (t *SliceType) DefaultGraphQLFieldName() string

func (*SliceType) GetCastToMethod

func (t *SliceType) GetCastToMethod() string

func (*SliceType) GetDBType

func (t *SliceType) GetDBType() string

json fields are stored as strings in the db

func (*SliceType) GetElemGraphQLType

func (t *SliceType) GetElemGraphQLType() string

func (*SliceType) GetGraphQLType

func (t *SliceType) GetGraphQLType() string

func (*SliceType) GetTSGraphQLImports

func (t *SliceType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*SliceType) GetTSType

func (t *SliceType) GetTSType() string

func (*SliceType) GetZeroValue

func (t *SliceType) GetZeroValue() string

func (*SliceType) Uncloneable added in v0.0.38

func (t *SliceType) Uncloneable() bool

type StringEnumType added in v0.1.0

type StringEnumType struct {
	EnumDBType  bool
	Type        string
	GraphQLType string
	Values      []string
	EnumMap     map[string]string
	// contains filtered or unexported fields
}

func (*StringEnumType) GetCastToMethod

func (t *StringEnumType) GetCastToMethod() string

func (*StringEnumType) GetDBType added in v0.1.0

func (t *StringEnumType) GetDBType() string

func (*StringEnumType) GetEnumData added in v0.1.0

func (t *StringEnumType) GetEnumData() *EnumData

func (*StringEnumType) GetGraphQLName

func (t *StringEnumType) GetGraphQLName() string

func (*StringEnumType) GetGraphQLType added in v0.1.0

func (t *StringEnumType) GetGraphQLType() string

func (*StringEnumType) GetNullableType added in v0.1.0

func (t *StringEnumType) GetNullableType() TSGraphQLType

func (*StringEnumType) GetTSGraphQLImports added in v0.1.0

func (t *StringEnumType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*StringEnumType) GetTSName

func (t *StringEnumType) GetTSName() string

func (*StringEnumType) GetTSType added in v0.1.0

func (t *StringEnumType) GetTSType() string

func (*StringEnumType) GetTsTypeImports added in v0.1.0

func (t *StringEnumType) GetTsTypeImports() []*tsimport.ImportPath

func (*StringEnumType) GetZeroValue

func (t *StringEnumType) GetZeroValue() string

type StringImport

type StringImport struct {
	// contains filtered or unexported fields
}

func (*StringImport) Aliases

func (imp *StringImport) Aliases() []string

func (*StringImport) DefaultImport

func (b *StringImport) DefaultImport() bool

func (*StringImport) Import

func (imp *StringImport) Import() string

func (*StringImport) ImportPath

func (b *StringImport) ImportPath() string

type StringType

type StringType struct {
	// contains filtered or unexported fields
}

func (*StringType) GetCastToMethod

func (t *StringType) GetCastToMethod() string

func (*StringType) GetDBType

func (t *StringType) GetDBType() string

func (*StringType) GetGraphQLType

func (t *StringType) GetGraphQLType() string

func (*StringType) GetImportType

func (t *StringType) GetImportType() Import

func (*StringType) GetNullableType

func (t *StringType) GetNullableType() TSGraphQLType

func (*StringType) GetTSGraphQLImports

func (t *StringType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*StringType) GetTSType

func (t *StringType) GetTSType() string

func (*StringType) GetZeroValue

func (t *StringType) GetZeroValue() string

hmm we don't use these for the nullable types right now. unclear if right thing...

type TSCodegenableType

type TSCodegenableType interface {
	TSGraphQLType
	GetImportType() Import
}

type TSGraphQLType

type TSGraphQLType interface {
	TSType
	// returns imports from outside in
	// e.g. required string => []tsimport.ImportPath{tsimport.NewGQLClassImportPath("GraphQLNonNull"), tsimport.NewGQLImportPath("GraphQLString")}
	GetTSGraphQLImports(input bool) []*tsimport.ImportPath
}

type TSType

type TSType interface {
	EntType
	GetTSType() string
}

types that also support Typescript TODO need to eventually add this for all things but starting with primitives for now

type TSTypeWithActionFields

type TSTypeWithActionFields interface {
	TSTypeWithCustomType
	GetActionFieldsInfo() *ActionFieldsInfo
}

type TSTypeWithCustomType added in v0.1.0

type TSTypeWithCustomType interface {
	TSGraphQLType
	GetCustomTypeInfo() *CustomTypeInfo
}

type TSTypeWithImports

type TSTypeWithImports interface {
	TSType
	GetTsTypeImports() []*tsimport.ImportPath
}

type TSWithSubFields added in v0.1.0

type TSWithSubFields interface {
	TSTypeWithCustomType
	// this is interface{} so as to avoid circular-dependencies with input.Fields
	GetSubFields() interface{}
}

type TSWithUnionFields added in v0.1.0

type TSWithUnionFields interface {
	TSTypeWithCustomType
	// this is interface{} so as to avoid circular-dependencies with input.Fields
	GetUnionFields() interface{}
}

type TimeImport

type TimeImport struct {
	// contains filtered or unexported fields
}

func (*TimeImport) Aliases

func (imp *TimeImport) Aliases() []string

func (*TimeImport) DefaultImport

func (b *TimeImport) DefaultImport() bool

func (*TimeImport) Import

func (imp *TimeImport) Import() string

func (*TimeImport) ImportPath

func (b *TimeImport) ImportPath() string

type TimeType

type TimeType struct {
	// contains filtered or unexported fields
}

func (*TimeType) DefaultGraphQLFieldName

func (t *TimeType) DefaultGraphQLFieldName() string

func (*TimeType) GetCastToMethod

func (t *TimeType) GetCastToMethod() string

func (*TimeType) GetDBType

func (t *TimeType) GetDBType() string

func (*TimeType) GetGraphQLType

func (t *TimeType) GetGraphQLType() string

func (*TimeType) GetImportType

func (t *TimeType) GetImportType() Import

func (*TimeType) GetNullableType

func (t *TimeType) GetNullableType() TSGraphQLType

func (*TimeType) GetTSGraphQLImports

func (t *TimeType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*TimeType) GetTSType

func (t *TimeType) GetTSType() string

func (*TimeType) GetZeroValue

func (t *TimeType) GetZeroValue() string

type TimestampImport

type TimestampImport struct {
	// contains filtered or unexported fields
}

func (*TimestampImport) Aliases

func (imp *TimestampImport) Aliases() []string

func (*TimestampImport) DefaultImport

func (b *TimestampImport) DefaultImport() bool

func (*TimestampImport) Import

func (imp *TimestampImport) Import() string

func (*TimestampImport) ImportPath

func (b *TimestampImport) ImportPath() string

type TimestampType

type TimestampType struct {
	// contains filtered or unexported fields
}

func (*TimestampType) Convert

func (t *TimestampType) Convert() *tsimport.ImportPath

func (*TimestampType) GetGraphQLType

func (t *TimestampType) GetGraphQLType() string

use the built in graphql type

func (*TimestampType) GetImportType

func (t *TimestampType) GetImportType() Import

func (*TimestampType) GetNullableType

func (t *TimestampType) GetNullableType() TSGraphQLType

func (*TimestampType) GetTSGraphQLImports

func (t *TimestampType) GetTSGraphQLImports(input bool) []*tsimport.ImportPath

func (*TimestampType) GetTSType

func (t *TimestampType) GetTSType() string

type TimestamptzImport

type TimestamptzImport struct {
	// contains filtered or unexported fields
}

func (*TimestamptzImport) Aliases

func (imp *TimestamptzImport) Aliases() []string

func (*TimestamptzImport) DefaultImport

func (b *TimestamptzImport) DefaultImport() bool

func (*TimestamptzImport) Import

func (imp *TimestamptzImport) Import() string

func (*TimestamptzImport) ImportPath

func (b *TimestamptzImport) ImportPath() string

type TimestamptzType

type TimestamptzType struct {
	TimestampType
}

func (*TimestamptzType) Convert

func (t *TimestamptzType) Convert() *tsimport.ImportPath

func (*TimestamptzType) GetDBType

func (t *TimestamptzType) GetDBType() string

func (*TimestamptzType) GetImportType

func (t *TimestamptzType) GetImportType() Import

func (*TimestamptzType) GetNullableType

func (t *TimestamptzType) GetNullableType() TSGraphQLType

type TimetzImport

type TimetzImport struct {
	// contains filtered or unexported fields
}

func (*TimetzImport) Aliases

func (imp *TimetzImport) Aliases() []string

func (*TimetzImport) DefaultImport

func (b *TimetzImport) DefaultImport() bool

func (*TimetzImport) Import

func (imp *TimetzImport) Import() string

func (*TimetzImport) ImportPath

func (b *TimetzImport) ImportPath() string

type TimetzType

type TimetzType struct {
	TimeType
}

func (*TimetzType) DefaultGraphQLFieldName

func (t *TimetzType) DefaultGraphQLFieldName() string

func (*TimetzType) GetCastToMethod

func (t *TimetzType) GetCastToMethod() string

func (*TimetzType) GetDBType

func (t *TimetzType) GetDBType() string

func (*TimetzType) GetImportType

func (t *TimetzType) GetImportType() Import

func (*TimetzType) GetNullableType

func (t *TimetzType) GetNullableType() TSGraphQLType

func (*TimetzType) GetZeroValue

func (t *TimetzType) GetZeroValue() string

type Type

type Type interface {
	GetGraphQLType() string
}

Type represents a Type that's expressed in the framework The only initial requirement is GraphQL since that's exposed everywhere

func GetNonNullableType

func GetNonNullableType(typ types.Type, forceRequired bool) Type

func GetNullableType

func GetNullableType(typ types.Type, nullable bool) Type

GetNullableType takes a type where the nullable-ness is not encoded in the type but alas somewhere else so we need to get the nullable type from a different place

func GetType

func GetType(typ types.Type) Type

type UUIDImport

type UUIDImport struct {
	// contains filtered or unexported fields
}

func (*UUIDImport) Aliases

func (imp *UUIDImport) Aliases() []string

func (*UUIDImport) DefaultImport

func (b *UUIDImport) DefaultImport() bool

func (*UUIDImport) Import

func (imp *UUIDImport) Import() string

func (*UUIDImport) ImportPath

func (b *UUIDImport) ImportPath() string

type UncloneableType added in v0.0.38

type UncloneableType interface {
	// some old go types are uncloneable and we just ignore
	// them here. will be killed once we clean this up
	Uncloneable() bool
}

Jump to

Keyboard shortcuts

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