How to use obj in linkTemplate in contextMenu in TextBlock

for problem bold/commented text in below code

GoJs(go.Link,
{
routing: go.Link.AvoidsNodes,
curve: go.Link.JumpOver,
corner: 5, toShortLength: 4

            },
            GoJs(go.Shape,  
              { isPanelMain: true, strokeWidth: 10, stroke: "transparent", name: "HIGHLIGHT" }),
            GoJs(go.Shape, 
              { isPanelMain: true, stroke: "gray", strokeWidth: 6 }),
            GoJs(go.Panel, "Auto",  
              { visible: true, name: "LABEL", segmentIndex: 2, segmentFraction: 0.5 },
              GoJs(go.Shape, "RoundedRectangle",  
                { fill: "#f4f2f2", stroke: null }),
                {
                    contextMenu:    
                      GoJs(go.Adornment, "Vertical", 
                        GoJs("ContextMenuButton",
                          GoJs(go.TextBlock, "innerJoin"),   **//Here what to use obj or (to/from property of link) in go.TextBlock** 
                          {
                              click: function (e, obj) {
                                  updateRelation(e, obj, "innerJoin");
                              }
                          })
                       
                      )  
                }     
          );

I believe you are asking about how to get the Link from the context menu button’s GraphObject.click event handler? Am I understanding your question correctly?

If that is indeed your question, that is answered in the Introduction page about context menus: GoJS Context Menus -- Northwoods Software. Look at the third paragraph:

Each “ContextMenuButton” is a Panel on which you can set the GraphObject.click event handler.
In the event handler obj.part will be the whole context menu Adornment.
obj.part.adornedPart will be the adorned Node or Link.
The bound data is obj.part.data, which will be the same as obj.part.adornedPart.data.

Thank you @walter