Use igraph to trigger functions/models on nodes

Assumed that we have a small graph including some models/functions (their attributes) as nodes and trigger or triggerToRun relationship as edges. I tried to find ways to run some models/functions on nodes using igraph capabilities

(e.g., query) but did not succeed.

Could you please advise if it is possible by using igraph or point me links?

It is not entirely clear what you are asking for. Could you perhaps post an example of what you would like to do?

Hey,
to make things simple, assume we have a small graph gt with 5 vertices and 4 edges:

gt = Graph(n = 4, edges = [[0, 2], [0, 4], [1, 2], [2, 3]], directed = T)

                               0 Action  ---action 2---> 4 Model 2 (e.g., "run Model 2")
                                       |
                                action 1
                                       |
                              downarrow

1 Input ------> 2 Model x*x+1 ------> 3 Output (e.g., 101)
(e.g., x = 10)

Act 1 = click on action node 0
Act 2 = hover over action node 0 with cursor

If Click on the action node then run model x*x + 1 with input x = 10 and the output will display/store on Output node 3
If hover over action node 0 then “run model 2” will display on Model 2 node.

Please advise me or direct me to possible readings.
Thank you!