Skip to content

Commit

Permalink
Update schema.go
Browse files Browse the repository at this point in the history
  • Loading branch information
tolgaOzen committed Dec 7, 2022
1 parent 7e0ab44 commit cff0bf9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pkg/development/graph/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,16 @@ func buildActionGraph(entity *base.EntityDefinition, from *Node, children []*bas
switch child.GetType().(type) {
case *base.Child_Rewrite:
rw := &Node{
Type: "logic",
ID: xid.New().String(),
Label: child.String(),
Type: "logic",
ID: xid.New().String(),
}

if child.GetRewrite().GetRewriteOperation() == base.Rewrite_OPERATION_INTERSECTION {
rw.Label = "and"
} else {
rw.Label = "or"
}

g.AddNode(rw)
g.AddEdge(from, rw, nil)
ag, err := buildActionGraph(entity, rw, child.GetRewrite().GetChildren())
Expand Down

0 comments on commit cff0bf9

Please sign in to comment.