Documentation ¶
Index ¶
- Constants
- func ActionEqual(a, a2 Action) bool
- func CompareActionInfo(a1, a2 *ActionInfo, opts ...change.CompareOption) []change.Change
- func GetActionMethodName(action Action) (string, error)
- func HasInput(action Action) bool
- func HasOnlyActionOnlyFields(action Action) bool
- func IsEdgeAction(action Action) bool
- func IsEdgeGroupAction(action Action) bool
- func IsRemoveEdgeAction(action Action) bool
- func IsRequiredField(action Action, field ActionField) bool
- type Action
- type ActionField
- type ActionInfo
- type AddEdgeAction
- func (action *AddEdgeAction) AddCustomField(typ enttype.TSTypeWithCustomType, cf *field.Field)
- func (action *AddEdgeAction) AddCustomInterfaces(a2 Action)
- func (action *AddEdgeAction) AddCustomNonEntField(typ enttype.TSTypeWithCustomType, cf *field.NonEntField)
- func (action *AddEdgeAction) ExposedToGraphQL() bool
- func (action *AddEdgeAction) GetActionInputName() string
- func (action *AddEdgeAction) GetActionName() string
- func (action *AddEdgeAction) GetCustomInterfaces() []*customtype.CustomInterface
- func (action *AddEdgeAction) GetEdgeGroup() *edge.AssociationEdgeGroup
- func (action *AddEdgeAction) GetEdges() []*edge.AssociationEdge
- func (action *AddEdgeAction) GetEditableFieldContext() field.EditableContext
- func (action *AddEdgeAction) GetFields() []*field.Field
- func (action *AddEdgeAction) GetGQLEnums() []*enum.GQLEnum
- func (action *AddEdgeAction) GetGraphQLFields() []*field.Field
- func (action *AddEdgeAction) GetGraphQLInputName() string
- func (action *AddEdgeAction) GetGraphQLInputTypeName() string
- func (action *AddEdgeAction) GetGraphQLName() string
- func (action *AddEdgeAction) GetGraphQLNonEntFields() []*field.NonEntField
- func (action *AddEdgeAction) GetGraphQLPayloadName() string
- func (action *AddEdgeAction) GetGraphQLPayloadTypeName() string
- func (action *AddEdgeAction) GetGraphQLTypeName() string
- func (action *AddEdgeAction) GetNodeInfo() nodeinfo.NodeInfo
- func (action *AddEdgeAction) GetNonEntFields() []*field.NonEntField
- func (action *AddEdgeAction) GetOperation() ent.ActionOperation
- func (action *AddEdgeAction) GetTSEnums() []*enum.Enum
- func (action *AddEdgeAction) IsDeletingNode() bool
- func (action *AddEdgeAction) MutatingExistingObject() bool
- func (action *AddEdgeAction) TransformsDelete() bool
- type CreateAction
- func (action *CreateAction) AddCustomField(typ enttype.TSTypeWithCustomType, cf *field.Field)
- func (action *CreateAction) AddCustomInterfaces(a2 Action)
- func (action *CreateAction) AddCustomNonEntField(typ enttype.TSTypeWithCustomType, cf *field.NonEntField)
- func (action *CreateAction) ExposedToGraphQL() bool
- func (action *CreateAction) GetActionInputName() string
- func (action *CreateAction) GetActionName() string
- func (action *CreateAction) GetCustomInterfaces() []*customtype.CustomInterface
- func (action *CreateAction) GetEdgeGroup() *edge.AssociationEdgeGroup
- func (action *CreateAction) GetEdges() []*edge.AssociationEdge
- func (action *CreateAction) GetEditableFieldContext() field.EditableContext
- func (action *CreateAction) GetFields() []*field.Field
- func (action *CreateAction) GetGQLEnums() []*enum.GQLEnum
- func (action *CreateAction) GetGraphQLFields() []*field.Field
- func (action *CreateAction) GetGraphQLInputName() string
- func (action *CreateAction) GetGraphQLInputTypeName() string
- func (action *CreateAction) GetGraphQLName() string
- func (action *CreateAction) GetGraphQLNonEntFields() []*field.NonEntField
- func (action *CreateAction) GetGraphQLPayloadName() string
- func (action *CreateAction) GetGraphQLPayloadTypeName() string
- func (action *CreateAction) GetGraphQLTypeName() string
- func (action *CreateAction) GetNodeInfo() nodeinfo.NodeInfo
- func (action *CreateAction) GetNonEntFields() []*field.NonEntField
- func (action *CreateAction) GetOperation() ent.ActionOperation
- func (action *CreateAction) GetTSEnums() []*enum.Enum
- func (action *CreateAction) IsDeletingNode() bool
- func (action *CreateAction) MutatingExistingObject() bool
- func (action *CreateAction) TransformsDelete() bool
- type DeleteAction
- func (action *DeleteAction) AddCustomField(typ enttype.TSTypeWithCustomType, cf *field.Field)
- func (action *DeleteAction) AddCustomInterfaces(a2 Action)
- func (action *DeleteAction) AddCustomNonEntField(typ enttype.TSTypeWithCustomType, cf *field.NonEntField)
- func (action *DeleteAction) ExposedToGraphQL() bool
- func (action *DeleteAction) GetActionInputName() string
- func (action *DeleteAction) GetActionName() string
- func (action *DeleteAction) GetCustomInterfaces() []*customtype.CustomInterface
- func (action *DeleteAction) GetEdgeGroup() *edge.AssociationEdgeGroup
- func (action *DeleteAction) GetEdges() []*edge.AssociationEdge
- func (action *DeleteAction) GetEditableFieldContext() field.EditableContext
- func (action *DeleteAction) GetFields() []*field.Field
- func (action *DeleteAction) GetGQLEnums() []*enum.GQLEnum
- func (action *DeleteAction) GetGraphQLFields() []*field.Field
- func (action *DeleteAction) GetGraphQLInputName() string
- func (action *DeleteAction) GetGraphQLInputTypeName() string
- func (action *DeleteAction) GetGraphQLName() string
- func (action *DeleteAction) GetGraphQLNonEntFields() []*field.NonEntField
- func (action *DeleteAction) GetGraphQLPayloadName() string
- func (action *DeleteAction) GetGraphQLPayloadTypeName() string
- func (action *DeleteAction) GetGraphQLTypeName() string
- func (action *DeleteAction) GetNodeInfo() nodeinfo.NodeInfo
- func (action *DeleteAction) GetNonEntFields() []*field.NonEntField
- func (action *DeleteAction) GetOperation() ent.ActionOperation
- func (action *DeleteAction) GetTSEnums() []*enum.Enum
- func (action *DeleteAction) IsDeletingNode() bool
- func (action *DeleteAction) MutatingExistingObject() bool
- func (action *DeleteAction) TransformsDelete() bool
- type EdgeActionTemplateInfo
- type EdgeGroupAction
- func (action *EdgeGroupAction) AddCustomField(typ enttype.TSTypeWithCustomType, cf *field.Field)
- func (action *EdgeGroupAction) AddCustomInterfaces(a2 Action)
- func (action *EdgeGroupAction) AddCustomNonEntField(typ enttype.TSTypeWithCustomType, cf *field.NonEntField)
- func (action *EdgeGroupAction) ExposedToGraphQL() bool
- func (action *EdgeGroupAction) GetActionInputName() string
- func (action *EdgeGroupAction) GetActionName() string
- func (action *EdgeGroupAction) GetCustomInterfaces() []*customtype.CustomInterface
- func (action *EdgeGroupAction) GetEdgeGroup() *edge.AssociationEdgeGroup
- func (action *EdgeGroupAction) GetEdges() []*edge.AssociationEdge
- func (action *EdgeGroupAction) GetEditableFieldContext() field.EditableContext
- func (action *EdgeGroupAction) GetFields() []*field.Field
- func (action *EdgeGroupAction) GetGQLEnums() []*enum.GQLEnum
- func (action *EdgeGroupAction) GetGraphQLFields() []*field.Field
- func (action *EdgeGroupAction) GetGraphQLInputName() string
- func (action *EdgeGroupAction) GetGraphQLInputTypeName() string
- func (action *EdgeGroupAction) GetGraphQLName() string
- func (action *EdgeGroupAction) GetGraphQLNonEntFields() []*field.NonEntField
- func (action *EdgeGroupAction) GetGraphQLPayloadName() string
- func (action *EdgeGroupAction) GetGraphQLPayloadTypeName() string
- func (action *EdgeGroupAction) GetGraphQLTypeName() string
- func (action *EdgeGroupAction) GetNodeInfo() nodeinfo.NodeInfo
- func (action *EdgeGroupAction) GetNonEntFields() []*field.NonEntField
- func (action *EdgeGroupAction) GetOperation() ent.ActionOperation
- func (action *EdgeGroupAction) GetTSEnums() []*enum.Enum
- func (action *EdgeGroupAction) IsDeletingNode() bool
- func (action *EdgeGroupAction) MutatingExistingObject() bool
- func (action *EdgeGroupAction) TransformsDelete() bool
- type EditAction
- func (action *EditAction) AddCustomField(typ enttype.TSTypeWithCustomType, cf *field.Field)
- func (action *EditAction) AddCustomInterfaces(a2 Action)
- func (action *EditAction) AddCustomNonEntField(typ enttype.TSTypeWithCustomType, cf *field.NonEntField)
- func (action *EditAction) ExposedToGraphQL() bool
- func (action *EditAction) GetActionInputName() string
- func (action *EditAction) GetActionName() string
- func (action *EditAction) GetCustomInterfaces() []*customtype.CustomInterface
- func (action *EditAction) GetEdgeGroup() *edge.AssociationEdgeGroup
- func (action *EditAction) GetEdges() []*edge.AssociationEdge
- func (action *EditAction) GetEditableFieldContext() field.EditableContext
- func (action *EditAction) GetFields() []*field.Field
- func (action *EditAction) GetGQLEnums() []*enum.GQLEnum
- func (action *EditAction) GetGraphQLFields() []*field.Field
- func (action *EditAction) GetGraphQLInputName() string
- func (action *EditAction) GetGraphQLInputTypeName() string
- func (action *EditAction) GetGraphQLName() string
- func (action *EditAction) GetGraphQLNonEntFields() []*field.NonEntField
- func (action *EditAction) GetGraphQLPayloadName() string
- func (action *EditAction) GetGraphQLPayloadTypeName() string
- func (action *EditAction) GetGraphQLTypeName() string
- func (action *EditAction) GetNodeInfo() nodeinfo.NodeInfo
- func (action *EditAction) GetNonEntFields() []*field.NonEntField
- func (action *EditAction) GetOperation() ent.ActionOperation
- func (action *EditAction) GetTSEnums() []*enum.Enum
- func (action *EditAction) IsDeletingNode() bool
- func (action *EditAction) MutatingExistingObject() bool
- func (action *EditAction) TransformsDelete() bool
- type Option
- type RelativeImports
- type RemoveEdgeAction
- func (action *RemoveEdgeAction) AddCustomField(typ enttype.TSTypeWithCustomType, cf *field.Field)
- func (action *RemoveEdgeAction) AddCustomInterfaces(a2 Action)
- func (action *RemoveEdgeAction) AddCustomNonEntField(typ enttype.TSTypeWithCustomType, cf *field.NonEntField)
- func (action *RemoveEdgeAction) ExposedToGraphQL() bool
- func (action *RemoveEdgeAction) GetActionInputName() string
- func (action *RemoveEdgeAction) GetActionName() string
- func (action *RemoveEdgeAction) GetCustomInterfaces() []*customtype.CustomInterface
- func (action *RemoveEdgeAction) GetEdgeGroup() *edge.AssociationEdgeGroup
- func (action *RemoveEdgeAction) GetEdges() []*edge.AssociationEdge
- func (action *RemoveEdgeAction) GetEditableFieldContext() field.EditableContext
- func (action *RemoveEdgeAction) GetFields() []*field.Field
- func (action *RemoveEdgeAction) GetGQLEnums() []*enum.GQLEnum
- func (action *RemoveEdgeAction) GetGraphQLFields() []*field.Field
- func (action *RemoveEdgeAction) GetGraphQLInputName() string
- func (action *RemoveEdgeAction) GetGraphQLInputTypeName() string
- func (action *RemoveEdgeAction) GetGraphQLName() string
- func (action *RemoveEdgeAction) GetGraphQLNonEntFields() []*field.NonEntField
- func (action *RemoveEdgeAction) GetGraphQLPayloadName() string
- func (action *RemoveEdgeAction) GetGraphQLPayloadTypeName() string
- func (action *RemoveEdgeAction) GetGraphQLTypeName() string
- func (action *RemoveEdgeAction) GetNodeInfo() nodeinfo.NodeInfo
- func (action *RemoveEdgeAction) GetNonEntFields() []*field.NonEntField
- func (action *RemoveEdgeAction) GetOperation() ent.ActionOperation
- func (action *RemoveEdgeAction) GetTSEnums() []*enum.Enum
- func (action *RemoveEdgeAction) IsDeletingNode() bool
- func (action *RemoveEdgeAction) MutatingExistingObject() bool
- func (action *RemoveEdgeAction) TransformsDelete() bool
Constants ¶
const NO_FIELDS = "__NO_FIELDS__"
provides a way to say this action doesn't have any fields
Variables ¶
This section is empty.
Functions ¶
func ActionEqual ¶ added in v0.0.38
func CompareActionInfo ¶ added in v0.0.38
func CompareActionInfo(a1, a2 *ActionInfo, opts ...change.CompareOption) []change.Change
func GetActionMethodName ¶
func HasOnlyActionOnlyFields ¶
func IsEdgeAction ¶
func IsEdgeGroupAction ¶
func IsRemoveEdgeAction ¶
func IsRequiredField ¶
func IsRequiredField(action Action, field ActionField) bool
Types ¶
type Action ¶
type Action interface { GetFields() []*field.Field GetGraphQLFields() []*field.Field GetNonEntFields() []*field.NonEntField GetGraphQLNonEntFields() []*field.NonEntField GetEdges() []*edge.AssociationEdge GetEdgeGroup() *edge.AssociationEdgeGroup GetActionName() string ExposedToGraphQL() bool GetGraphQLName() string GetGraphQLTypeName() string GetActionInputName() string GetGraphQLInputName() string GetGraphQLInputTypeName() string GetGraphQLPayloadName() string GetGraphQLPayloadTypeName() string MutatingExistingObject() bool // whether to add User, Note etc params GetNodeInfo() nodeinfo.NodeInfo GetOperation() ent.ActionOperation IsDeletingNode() bool AddCustomField(enttype.TSTypeWithCustomType, *field.Field) AddCustomNonEntField(enttype.TSTypeWithCustomType, *field.NonEntField) AddCustomInterfaces(a Action) GetCustomInterfaces() []*customtype.CustomInterface GetTSEnums() []*enum.Enum GetGQLEnums() []*enum.GQLEnum GetEditableFieldContext() field.EditableContext TransformsDelete() bool // contains filtered or unexported methods }
type ActionField ¶ added in v0.0.35
type ActionField interface { GetFieldType() enttype.Type TsFieldName(cfg codegenapi.Config) string TsBuilderType(cfg codegenapi.Config) string TSPublicAPIName() string TsBuilderFieldName() string GetGraphQLName() string ForceRequiredInAction() bool ForceOptionalInAction() bool DefaultValue() *string Nullable() bool HasDefaultValueOnCreate() bool GetTsType() string IsEditableIDField(ctx field.EditableContext) bool GetTsTypeImports() []*tsimport.ImportPath }
type ActionInfo ¶
type ActionInfo struct { Actions []Action // contains filtered or unexported fields }
func NewActionInfo ¶
func NewActionInfo() *ActionInfo
func ParseFromInput ¶
func ParseFromInputNode ¶ added in v0.0.38
func ParseFromInputNode(cfg codegenapi.Config, nodeName string, node *input.Node, lang base.Language) (*ActionInfo, error)
func (*ActionInfo) GetByGraphQLName ¶
func (info *ActionInfo) GetByGraphQLName(name string) Action
func (*ActionInfo) GetByName ¶
func (info *ActionInfo) GetByName(name string) Action
type AddEdgeAction ¶
type AddEdgeAction struct {
// contains filtered or unexported fields
}
func (*AddEdgeAction) AddCustomField ¶
func (action *AddEdgeAction) AddCustomField(typ enttype.TSTypeWithCustomType, cf *field.Field)
func (*AddEdgeAction) AddCustomInterfaces ¶
func (action *AddEdgeAction) AddCustomInterfaces(a2 Action)
Unclear what the best solution is here but the decision here is to create (duplicate) a private interface in the action that represents the input but in GraphQL we import the existing one since GraphQL names are unique across the types and we don't crazy naming conflicts in here we can (and should?) probably namespace the private generated interface name by adding a new prefix but no conflicts yet so leaving it for now This choice isn't consistent but is the easiest path so doing that
func (*AddEdgeAction) AddCustomNonEntField ¶
func (action *AddEdgeAction) AddCustomNonEntField(typ enttype.TSTypeWithCustomType, cf *field.NonEntField)
func (*AddEdgeAction) ExposedToGraphQL ¶
func (action *AddEdgeAction) ExposedToGraphQL() bool
func (*AddEdgeAction) GetActionInputName ¶ added in v0.0.39
func (action *AddEdgeAction) GetActionInputName() string
func (*AddEdgeAction) GetActionName ¶
func (action *AddEdgeAction) GetActionName() string
func (*AddEdgeAction) GetCustomInterfaces ¶
func (action *AddEdgeAction) GetCustomInterfaces() []*customtype.CustomInterface
func (*AddEdgeAction) GetEdgeGroup ¶
func (action *AddEdgeAction) GetEdgeGroup() *edge.AssociationEdgeGroup
func (*AddEdgeAction) GetEdges ¶
func (action *AddEdgeAction) GetEdges() []*edge.AssociationEdge
func (*AddEdgeAction) GetEditableFieldContext ¶ added in v0.1.0
func (action *AddEdgeAction) GetEditableFieldContext() field.EditableContext
func (*AddEdgeAction) GetGQLEnums ¶
func (*AddEdgeAction) GetGraphQLFields ¶ added in v0.0.38
func (*AddEdgeAction) GetGraphQLInputName ¶ added in v0.0.39
func (action *AddEdgeAction) GetGraphQLInputName() string
func (*AddEdgeAction) GetGraphQLInputTypeName ¶ added in v0.1.0
func (action *AddEdgeAction) GetGraphQLInputTypeName() string
func (*AddEdgeAction) GetGraphQLName ¶
func (action *AddEdgeAction) GetGraphQLName() string
func (*AddEdgeAction) GetGraphQLNonEntFields ¶ added in v0.1.0
func (action *AddEdgeAction) GetGraphQLNonEntFields() []*field.NonEntField
func (*AddEdgeAction) GetGraphQLPayloadName ¶ added in v0.1.0
func (action *AddEdgeAction) GetGraphQLPayloadName() string
func (*AddEdgeAction) GetGraphQLPayloadTypeName ¶ added in v0.1.0
func (action *AddEdgeAction) GetGraphQLPayloadTypeName() string
func (*AddEdgeAction) GetGraphQLTypeName ¶ added in v0.1.0
func (action *AddEdgeAction) GetGraphQLTypeName() string
func (*AddEdgeAction) GetNodeInfo ¶
func (*AddEdgeAction) GetNonEntFields ¶
func (action *AddEdgeAction) GetNonEntFields() []*field.NonEntField
func (*AddEdgeAction) GetOperation ¶
func (action *AddEdgeAction) GetOperation() ent.ActionOperation
func (*AddEdgeAction) GetTSEnums ¶
func (*AddEdgeAction) IsDeletingNode ¶
func (action *AddEdgeAction) IsDeletingNode() bool
func (*AddEdgeAction) MutatingExistingObject ¶
func (action *AddEdgeAction) MutatingExistingObject() bool
func (*AddEdgeAction) TransformsDelete ¶ added in v0.0.39
func (action *AddEdgeAction) TransformsDelete() bool
type CreateAction ¶
type CreateAction struct {
// contains filtered or unexported fields
}
func (*CreateAction) AddCustomField ¶
func (action *CreateAction) AddCustomField(typ enttype.TSTypeWithCustomType, cf *field.Field)
func (*CreateAction) AddCustomInterfaces ¶
func (action *CreateAction) AddCustomInterfaces(a2 Action)
Unclear what the best solution is here but the decision here is to create (duplicate) a private interface in the action that represents the input but in GraphQL we import the existing one since GraphQL names are unique across the types and we don't crazy naming conflicts in here we can (and should?) probably namespace the private generated interface name by adding a new prefix but no conflicts yet so leaving it for now This choice isn't consistent but is the easiest path so doing that
func (*CreateAction) AddCustomNonEntField ¶
func (action *CreateAction) AddCustomNonEntField(typ enttype.TSTypeWithCustomType, cf *field.NonEntField)
func (*CreateAction) ExposedToGraphQL ¶
func (action *CreateAction) ExposedToGraphQL() bool
func (*CreateAction) GetActionInputName ¶ added in v0.0.39
func (action *CreateAction) GetActionInputName() string
func (*CreateAction) GetActionName ¶
func (action *CreateAction) GetActionName() string
func (*CreateAction) GetCustomInterfaces ¶
func (action *CreateAction) GetCustomInterfaces() []*customtype.CustomInterface
func (*CreateAction) GetEdgeGroup ¶
func (action *CreateAction) GetEdgeGroup() *edge.AssociationEdgeGroup
func (*CreateAction) GetEdges ¶
func (action *CreateAction) GetEdges() []*edge.AssociationEdge
func (*CreateAction) GetEditableFieldContext ¶ added in v0.1.0
func (action *CreateAction) GetEditableFieldContext() field.EditableContext
func (*CreateAction) GetGQLEnums ¶
func (*CreateAction) GetGraphQLFields ¶ added in v0.0.38
func (*CreateAction) GetGraphQLInputName ¶ added in v0.0.39
func (action *CreateAction) GetGraphQLInputName() string
func (*CreateAction) GetGraphQLInputTypeName ¶ added in v0.1.0
func (action *CreateAction) GetGraphQLInputTypeName() string
func (*CreateAction) GetGraphQLName ¶
func (action *CreateAction) GetGraphQLName() string
func (*CreateAction) GetGraphQLNonEntFields ¶ added in v0.1.0
func (action *CreateAction) GetGraphQLNonEntFields() []*field.NonEntField
func (*CreateAction) GetGraphQLPayloadName ¶ added in v0.1.0
func (action *CreateAction) GetGraphQLPayloadName() string
func (*CreateAction) GetGraphQLPayloadTypeName ¶ added in v0.1.0
func (action *CreateAction) GetGraphQLPayloadTypeName() string
func (*CreateAction) GetGraphQLTypeName ¶ added in v0.1.0
func (action *CreateAction) GetGraphQLTypeName() string
func (*CreateAction) GetNodeInfo ¶
func (*CreateAction) GetNonEntFields ¶
func (action *CreateAction) GetNonEntFields() []*field.NonEntField
func (*CreateAction) GetOperation ¶
func (action *CreateAction) GetOperation() ent.ActionOperation
func (*CreateAction) GetTSEnums ¶
func (*CreateAction) IsDeletingNode ¶
func (action *CreateAction) IsDeletingNode() bool
func (*CreateAction) MutatingExistingObject ¶
func (action *CreateAction) MutatingExistingObject() bool
func (*CreateAction) TransformsDelete ¶ added in v0.0.39
func (action *CreateAction) TransformsDelete() bool
type DeleteAction ¶
type DeleteAction struct {
// contains filtered or unexported fields
}
func (*DeleteAction) AddCustomField ¶
func (action *DeleteAction) AddCustomField(typ enttype.TSTypeWithCustomType, cf *field.Field)
func (*DeleteAction) AddCustomInterfaces ¶
func (action *DeleteAction) AddCustomInterfaces(a2 Action)
Unclear what the best solution is here but the decision here is to create (duplicate) a private interface in the action that represents the input but in GraphQL we import the existing one since GraphQL names are unique across the types and we don't crazy naming conflicts in here we can (and should?) probably namespace the private generated interface name by adding a new prefix but no conflicts yet so leaving it for now This choice isn't consistent but is the easiest path so doing that
func (*DeleteAction) AddCustomNonEntField ¶
func (action *DeleteAction) AddCustomNonEntField(typ enttype.TSTypeWithCustomType, cf *field.NonEntField)
func (*DeleteAction) ExposedToGraphQL ¶
func (action *DeleteAction) ExposedToGraphQL() bool
func (*DeleteAction) GetActionInputName ¶ added in v0.0.39
func (action *DeleteAction) GetActionInputName() string
func (*DeleteAction) GetActionName ¶
func (action *DeleteAction) GetActionName() string
func (*DeleteAction) GetCustomInterfaces ¶
func (action *DeleteAction) GetCustomInterfaces() []*customtype.CustomInterface
func (*DeleteAction) GetEdgeGroup ¶
func (action *DeleteAction) GetEdgeGroup() *edge.AssociationEdgeGroup
func (*DeleteAction) GetEdges ¶
func (action *DeleteAction) GetEdges() []*edge.AssociationEdge
func (*DeleteAction) GetEditableFieldContext ¶ added in v0.1.0
func (action *DeleteAction) GetEditableFieldContext() field.EditableContext
func (*DeleteAction) GetGQLEnums ¶
func (*DeleteAction) GetGraphQLFields ¶ added in v0.0.38
func (*DeleteAction) GetGraphQLInputName ¶ added in v0.0.39
func (action *DeleteAction) GetGraphQLInputName() string
func (*DeleteAction) GetGraphQLInputTypeName ¶ added in v0.1.0
func (action *DeleteAction) GetGraphQLInputTypeName() string
func (*DeleteAction) GetGraphQLName ¶
func (action *DeleteAction) GetGraphQLName() string
func (*DeleteAction) GetGraphQLNonEntFields ¶ added in v0.1.0
func (action *DeleteAction) GetGraphQLNonEntFields() []*field.NonEntField
func (*DeleteAction) GetGraphQLPayloadName ¶ added in v0.1.0
func (action *DeleteAction) GetGraphQLPayloadName() string
func (*DeleteAction) GetGraphQLPayloadTypeName ¶ added in v0.1.0
func (action *DeleteAction) GetGraphQLPayloadTypeName() string
func (*DeleteAction) GetGraphQLTypeName ¶ added in v0.1.0
func (action *DeleteAction) GetGraphQLTypeName() string
func (*DeleteAction) GetNodeInfo ¶
func (*DeleteAction) GetNonEntFields ¶
func (action *DeleteAction) GetNonEntFields() []*field.NonEntField
func (*DeleteAction) GetOperation ¶
func (action *DeleteAction) GetOperation() ent.ActionOperation
func (*DeleteAction) GetTSEnums ¶
func (*DeleteAction) IsDeletingNode ¶
func (action *DeleteAction) IsDeletingNode() bool
func (*DeleteAction) MutatingExistingObject ¶
func (action *DeleteAction) MutatingExistingObject() bool
func (*DeleteAction) TransformsDelete ¶ added in v0.0.39
func (action *DeleteAction) TransformsDelete() bool
type EdgeActionTemplateInfo ¶
type EdgeActionTemplateInfo struct { EdgeName string InstanceName string // AssocEdge *edge.AssociationEdge NodeType string Node string TSEdgeConst string TSNodeID string TSAddMethodName string TSAddIDMethodName string TSRemoveMethodName string Edge edge.Edge }
func GetEdges ¶
func GetEdges(action Action) []EdgeActionTemplateInfo
func GetEdgesFromEdges ¶
func GetEdgesFromEdges(edges []*edge.AssociationEdge) []EdgeActionTemplateInfo
this is still being used...
type EdgeGroupAction ¶
type EdgeGroupAction struct {
// contains filtered or unexported fields
}
func (*EdgeGroupAction) AddCustomField ¶
func (action *EdgeGroupAction) AddCustomField(typ enttype.TSTypeWithCustomType, cf *field.Field)
func (*EdgeGroupAction) AddCustomInterfaces ¶
func (action *EdgeGroupAction) AddCustomInterfaces(a2 Action)
Unclear what the best solution is here but the decision here is to create (duplicate) a private interface in the action that represents the input but in GraphQL we import the existing one since GraphQL names are unique across the types and we don't crazy naming conflicts in here we can (and should?) probably namespace the private generated interface name by adding a new prefix but no conflicts yet so leaving it for now This choice isn't consistent but is the easiest path so doing that
func (*EdgeGroupAction) AddCustomNonEntField ¶
func (action *EdgeGroupAction) AddCustomNonEntField(typ enttype.TSTypeWithCustomType, cf *field.NonEntField)
func (*EdgeGroupAction) ExposedToGraphQL ¶
func (action *EdgeGroupAction) ExposedToGraphQL() bool
func (*EdgeGroupAction) GetActionInputName ¶ added in v0.0.39
func (action *EdgeGroupAction) GetActionInputName() string
func (*EdgeGroupAction) GetActionName ¶
func (action *EdgeGroupAction) GetActionName() string
func (*EdgeGroupAction) GetCustomInterfaces ¶
func (action *EdgeGroupAction) GetCustomInterfaces() []*customtype.CustomInterface
func (*EdgeGroupAction) GetEdgeGroup ¶
func (action *EdgeGroupAction) GetEdgeGroup() *edge.AssociationEdgeGroup
func (*EdgeGroupAction) GetEdges ¶
func (action *EdgeGroupAction) GetEdges() []*edge.AssociationEdge
func (*EdgeGroupAction) GetEditableFieldContext ¶ added in v0.1.0
func (action *EdgeGroupAction) GetEditableFieldContext() field.EditableContext
func (*EdgeGroupAction) GetGQLEnums ¶
func (*EdgeGroupAction) GetGraphQLFields ¶ added in v0.0.38
func (*EdgeGroupAction) GetGraphQLInputName ¶ added in v0.0.39
func (action *EdgeGroupAction) GetGraphQLInputName() string
func (*EdgeGroupAction) GetGraphQLInputTypeName ¶ added in v0.1.0
func (action *EdgeGroupAction) GetGraphQLInputTypeName() string
func (*EdgeGroupAction) GetGraphQLName ¶
func (action *EdgeGroupAction) GetGraphQLName() string
func (*EdgeGroupAction) GetGraphQLNonEntFields ¶ added in v0.1.0
func (action *EdgeGroupAction) GetGraphQLNonEntFields() []*field.NonEntField
func (*EdgeGroupAction) GetGraphQLPayloadName ¶ added in v0.1.0
func (action *EdgeGroupAction) GetGraphQLPayloadName() string
func (*EdgeGroupAction) GetGraphQLPayloadTypeName ¶ added in v0.1.0
func (action *EdgeGroupAction) GetGraphQLPayloadTypeName() string
func (*EdgeGroupAction) GetGraphQLTypeName ¶ added in v0.1.0
func (action *EdgeGroupAction) GetGraphQLTypeName() string
func (*EdgeGroupAction) GetNodeInfo ¶
func (*EdgeGroupAction) GetNonEntFields ¶
func (action *EdgeGroupAction) GetNonEntFields() []*field.NonEntField
func (*EdgeGroupAction) GetOperation ¶
func (action *EdgeGroupAction) GetOperation() ent.ActionOperation
func (*EdgeGroupAction) GetTSEnums ¶
func (*EdgeGroupAction) IsDeletingNode ¶
func (action *EdgeGroupAction) IsDeletingNode() bool
func (*EdgeGroupAction) MutatingExistingObject ¶
func (action *EdgeGroupAction) MutatingExistingObject() bool
func (*EdgeGroupAction) TransformsDelete ¶ added in v0.0.39
func (action *EdgeGroupAction) TransformsDelete() bool
type EditAction ¶
type EditAction struct {
// contains filtered or unexported fields
}
func (*EditAction) AddCustomField ¶
func (action *EditAction) AddCustomField(typ enttype.TSTypeWithCustomType, cf *field.Field)
func (*EditAction) AddCustomInterfaces ¶
func (action *EditAction) AddCustomInterfaces(a2 Action)
Unclear what the best solution is here but the decision here is to create (duplicate) a private interface in the action that represents the input but in GraphQL we import the existing one since GraphQL names are unique across the types and we don't crazy naming conflicts in here we can (and should?) probably namespace the private generated interface name by adding a new prefix but no conflicts yet so leaving it for now This choice isn't consistent but is the easiest path so doing that
func (*EditAction) AddCustomNonEntField ¶
func (action *EditAction) AddCustomNonEntField(typ enttype.TSTypeWithCustomType, cf *field.NonEntField)
func (*EditAction) ExposedToGraphQL ¶
func (action *EditAction) ExposedToGraphQL() bool
func (*EditAction) GetActionInputName ¶ added in v0.0.39
func (action *EditAction) GetActionInputName() string
func (*EditAction) GetActionName ¶
func (action *EditAction) GetActionName() string
func (*EditAction) GetCustomInterfaces ¶
func (action *EditAction) GetCustomInterfaces() []*customtype.CustomInterface
func (*EditAction) GetEdgeGroup ¶
func (action *EditAction) GetEdgeGroup() *edge.AssociationEdgeGroup
func (*EditAction) GetEdges ¶
func (action *EditAction) GetEdges() []*edge.AssociationEdge
func (*EditAction) GetEditableFieldContext ¶ added in v0.1.0
func (action *EditAction) GetEditableFieldContext() field.EditableContext
func (*EditAction) GetGQLEnums ¶
func (*EditAction) GetGraphQLFields ¶ added in v0.0.38
func (*EditAction) GetGraphQLInputName ¶ added in v0.0.39
func (action *EditAction) GetGraphQLInputName() string
func (*EditAction) GetGraphQLInputTypeName ¶ added in v0.1.0
func (action *EditAction) GetGraphQLInputTypeName() string
func (*EditAction) GetGraphQLName ¶
func (action *EditAction) GetGraphQLName() string
func (*EditAction) GetGraphQLNonEntFields ¶ added in v0.1.0
func (action *EditAction) GetGraphQLNonEntFields() []*field.NonEntField
func (*EditAction) GetGraphQLPayloadName ¶ added in v0.1.0
func (action *EditAction) GetGraphQLPayloadName() string
func (*EditAction) GetGraphQLPayloadTypeName ¶ added in v0.1.0
func (action *EditAction) GetGraphQLPayloadTypeName() string
func (*EditAction) GetGraphQLTypeName ¶ added in v0.1.0
func (action *EditAction) GetGraphQLTypeName() string
func (*EditAction) GetNodeInfo ¶
func (*EditAction) GetNonEntFields ¶
func (action *EditAction) GetNonEntFields() []*field.NonEntField
func (*EditAction) GetOperation ¶
func (action *EditAction) GetOperation() ent.ActionOperation
func (*EditAction) GetTSEnums ¶
func (*EditAction) IsDeletingNode ¶
func (action *EditAction) IsDeletingNode() bool
func (*EditAction) MutatingExistingObject ¶
func (action *EditAction) MutatingExistingObject() bool
func (*EditAction) TransformsDelete ¶ added in v0.0.39
func (action *EditAction) TransformsDelete() bool
type Option ¶ added in v0.0.39
type Option func(*option)
func TransformsDelete ¶ added in v0.0.39
func TransformsDelete() Option
type RelativeImports ¶ added in v0.1.0
type RelativeImports struct { Imports []*tsimport.ImportPath FieldsWithRelative map[string]*field.Field RelativeInputName string }
func InputWithRelative ¶ added in v0.1.0
func InputWithRelative(action Action, cfg codegenapi.Config) *RelativeImports
func (*RelativeImports) RelativeField ¶ added in v0.1.0
func (ri *RelativeImports) RelativeField(name string) bool
type RemoveEdgeAction ¶
type RemoveEdgeAction struct {
// contains filtered or unexported fields
}
func (*RemoveEdgeAction) AddCustomField ¶
func (action *RemoveEdgeAction) AddCustomField(typ enttype.TSTypeWithCustomType, cf *field.Field)
func (*RemoveEdgeAction) AddCustomInterfaces ¶
func (action *RemoveEdgeAction) AddCustomInterfaces(a2 Action)
Unclear what the best solution is here but the decision here is to create (duplicate) a private interface in the action that represents the input but in GraphQL we import the existing one since GraphQL names are unique across the types and we don't crazy naming conflicts in here we can (and should?) probably namespace the private generated interface name by adding a new prefix but no conflicts yet so leaving it for now This choice isn't consistent but is the easiest path so doing that
func (*RemoveEdgeAction) AddCustomNonEntField ¶
func (action *RemoveEdgeAction) AddCustomNonEntField(typ enttype.TSTypeWithCustomType, cf *field.NonEntField)
func (*RemoveEdgeAction) ExposedToGraphQL ¶
func (action *RemoveEdgeAction) ExposedToGraphQL() bool
func (*RemoveEdgeAction) GetActionInputName ¶ added in v0.0.39
func (action *RemoveEdgeAction) GetActionInputName() string
func (*RemoveEdgeAction) GetActionName ¶
func (action *RemoveEdgeAction) GetActionName() string
func (*RemoveEdgeAction) GetCustomInterfaces ¶
func (action *RemoveEdgeAction) GetCustomInterfaces() []*customtype.CustomInterface
func (*RemoveEdgeAction) GetEdgeGroup ¶
func (action *RemoveEdgeAction) GetEdgeGroup() *edge.AssociationEdgeGroup
func (*RemoveEdgeAction) GetEdges ¶
func (action *RemoveEdgeAction) GetEdges() []*edge.AssociationEdge
func (*RemoveEdgeAction) GetEditableFieldContext ¶ added in v0.1.0
func (action *RemoveEdgeAction) GetEditableFieldContext() field.EditableContext
func (*RemoveEdgeAction) GetGQLEnums ¶
func (*RemoveEdgeAction) GetGraphQLFields ¶ added in v0.0.38
func (*RemoveEdgeAction) GetGraphQLInputName ¶ added in v0.0.39
func (action *RemoveEdgeAction) GetGraphQLInputName() string
func (*RemoveEdgeAction) GetGraphQLInputTypeName ¶ added in v0.1.0
func (action *RemoveEdgeAction) GetGraphQLInputTypeName() string
func (*RemoveEdgeAction) GetGraphQLName ¶
func (action *RemoveEdgeAction) GetGraphQLName() string
func (*RemoveEdgeAction) GetGraphQLNonEntFields ¶ added in v0.1.0
func (action *RemoveEdgeAction) GetGraphQLNonEntFields() []*field.NonEntField
func (*RemoveEdgeAction) GetGraphQLPayloadName ¶ added in v0.1.0
func (action *RemoveEdgeAction) GetGraphQLPayloadName() string
func (*RemoveEdgeAction) GetGraphQLPayloadTypeName ¶ added in v0.1.0
func (action *RemoveEdgeAction) GetGraphQLPayloadTypeName() string
func (*RemoveEdgeAction) GetGraphQLTypeName ¶ added in v0.1.0
func (action *RemoveEdgeAction) GetGraphQLTypeName() string
func (*RemoveEdgeAction) GetNodeInfo ¶
func (*RemoveEdgeAction) GetNonEntFields ¶
func (action *RemoveEdgeAction) GetNonEntFields() []*field.NonEntField
func (*RemoveEdgeAction) GetOperation ¶
func (action *RemoveEdgeAction) GetOperation() ent.ActionOperation
func (*RemoveEdgeAction) GetTSEnums ¶
func (*RemoveEdgeAction) IsDeletingNode ¶
func (action *RemoveEdgeAction) IsDeletingNode() bool
func (*RemoveEdgeAction) MutatingExistingObject ¶
func (action *RemoveEdgeAction) MutatingExistingObject() bool
func (*RemoveEdgeAction) TransformsDelete ¶ added in v0.0.39
func (action *RemoveEdgeAction) TransformsDelete() bool