From cff0bf9a1ea30bd3ea54bf0a2409c07c9ec8dda2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tolga=20O=CC=88zen?= Date: Wed, 7 Dec 2022 13:10:53 +0300 Subject: [PATCH] Update schema.go --- pkg/development/graph/schema.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkg/development/graph/schema.go b/pkg/development/graph/schema.go index bb46ecd99..cedaa9835 100644 --- a/pkg/development/graph/schema.go +++ b/pkg/development/graph/schema.go @@ -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())